mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
[MM-63618] add abac settings (#30602)
This commit is contained in:
parent
545de88486
commit
5c5aa06fea
1 changed files with 17 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue