mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: remove IsDisabled method for access control (#74340)
remove IsDisabled method for access control, clean up tests
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user