Chore: remove IsDisabled method for access control (#74340)

remove IsDisabled method for access control, clean up tests
This commit is contained in:
Ieva
2023-09-05 11:04:39 +01:00
committed by GitHub
parent 5ea16cb947
commit 58efa49933
14 changed files with 11 additions and 64 deletions

View File

@@ -536,7 +536,6 @@ type Cfg struct {
OAuth2ServerAccessTokenLifespan time.Duration
// Access Control
RBACEnabled bool
RBACPermissionCache bool
// Enable Permission validation during role creation and provisioning
RBACPermissionValidationEnabled bool
@@ -970,11 +969,10 @@ var skipStaticRootValidation = false
func NewCfg() *Cfg {
return &Cfg{
Target: []string{"all"},
Logger: log.New("settings"),
Raw: ini.Empty(),
Azure: &azsettings.AzureSettings{},
RBACEnabled: true,
Target: []string{"all"},
Logger: log.New("settings"),
Raw: ini.Empty(),
Azure: &azsettings.AzureSettings{},
}
}
@@ -1659,7 +1657,6 @@ func readAuthSettings(iniFile *ini.File, cfg *Cfg) (err error) {
func readAccessControlSettings(iniFile *ini.File, cfg *Cfg) {
rbac := iniFile.Section("rbac")
cfg.RBACEnabled = true
cfg.RBACPermissionCache = rbac.Key("permission_cache").MustBool(true)
cfg.RBACPermissionValidationEnabled = rbac.Key("permission_validation_enabled").MustBool(false)
cfg.RBACResetBasicRoles = rbac.Key("reset_basic_roles").MustBool(false)