RBAC: Add config option to reset basic roles on start up (#59598)

* RBAC: add config option to reset basic roles on start up

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Update docs

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Add to sample.ini as well

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
This commit is contained in:
Gabriel MABILLE
2022-12-01 09:41:40 +01:00
committed by GitHub
co-authored by Jguer
parent 009d65b794
commit 8e929163a8
5 changed files with 37 additions and 2 deletions
+3
View File
@@ -482,6 +482,8 @@ type Cfg struct {
RBACPermissionCache bool
// Enable Permission validation during role creation and provisioning
RBACPermissionValidationEnabled bool
// Reset basic roles permissions on start-up
RBACResetBasicRoles bool
// GRPC Server.
GRPCServerNetwork string
GRPCServerAddress string
@@ -1447,6 +1449,7 @@ func readAccessControlSettings(iniFile *ini.File, cfg *Cfg) {
cfg.RBACEnabled = rbac.Key("enabled").MustBool(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)
}
func readUserSettings(iniFile *ini.File, cfg *Cfg) error {