MM-14439: experimental restrict system admin (#10414)

* api4: break out license and config from system

* app: move some config functions from admin.go to config.go

* add ExperimentalSettings.RestrictSystemAdmin

* forbid various actions to restricted system admin

* update default.json

* fix function names in errors
Этот коммит содержится в:
Jesse Hallam
2019-03-08 13:15:28 -05:00
коммит произвёл GitHub
родитель 200cfdd4a7
Коммит 9ef8c1e8b1
16 изменённых файлов: 929 добавлений и 701 удалений

Просмотреть файл

@@ -713,6 +713,7 @@ type ExperimentalSettings struct {
ClientSideCertCheck *string
DisablePostMetadata *bool
LinkMetadataTimeoutMilliseconds *int64
RestrictSystemAdmin *bool
}
func (s *ExperimentalSettings) SetDefaults() {
@@ -731,6 +732,10 @@ func (s *ExperimentalSettings) SetDefaults() {
if s.LinkMetadataTimeoutMilliseconds == nil {
s.LinkMetadataTimeoutMilliseconds = NewInt64(EXPERIMENTAL_SETTINGS_DEFAULT_LINK_METADATA_TIMEOUT_MILLISECONDS)
}
if s.RestrictSystemAdmin == nil {
s.RestrictSystemAdmin = NewBool(false)
}
}
type AnalyticsSettings struct {