[MM-63618] add abac settings (#30602)

This commit is contained in:
Ibrahim Serdar Acikgoz 2025-04-11 12:43:47 +02:00 committed by GitHub
parent 545de88486
commit 5c5aa06fea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3653,6 +3653,21 @@ func (s *ExportSettings) SetDefaults() {
}
}
type AccessControlSettings struct {
EnableAttributeBasedAccessControl *bool `access:"write_restrictable,cloud_restrictable"`
EnableChannelScopeAccessControl *bool `access:"cloud_restrictable"`
}
func (s *AccessControlSettings) SetDefaults() {
if s.EnableAttributeBasedAccessControl == nil {
s.EnableAttributeBasedAccessControl = NewPointer(false)
}
if s.EnableChannelScopeAccessControl == nil {
s.EnableChannelScopeAccessControl = NewPointer(false)
}
}
type ConfigFunc func() *Config
const (
@ -3745,6 +3760,7 @@ type Config struct {
ExportSettings ExportSettings
WranglerSettings WranglerSettings
ConnectedWorkspacesSettings ConnectedWorkspacesSettings
AccessControlSettings AccessControlSettings
}
func (o *Config) Auditable() map[string]any {
@ -3862,6 +3878,7 @@ func (o *Config) SetDefaults() {
o.ExportSettings.SetDefaults()
o.WranglerSettings.SetDefaults()
o.ConnectedWorkspacesSettings.SetDefaults(isUpdate, o.ExperimentalSettings)
o.AccessControlSettings.SetDefaults()
}
func (o *Config) IsValid() *AppError {