AccessControl: Add enterprise only setting for rbac permission cache (#49006)
* Add enterprise only setting for RBAC permission cache Co-authored-by: Jguer <joao.guerreiro@grafana.com>
This commit is contained in:
@@ -646,6 +646,8 @@ managed_identity_client_id =
|
||||
#################################### Role-based Access Control ###########
|
||||
[rbac]
|
||||
enabled = true
|
||||
# If enabled, cache permissions in a in memory cache (Enterprise only)
|
||||
permission_cache = true
|
||||
|
||||
#################################### SMTP / Emailing #####################
|
||||
[smtp]
|
||||
|
||||
+2
-1
@@ -626,7 +626,8 @@
|
||||
#################################### Role-based Access Control ###########
|
||||
[rbac]
|
||||
;enabled = true
|
||||
|
||||
# If enabled, cache permissions in a in memory cache (Enterprise only)
|
||||
;permission_cache = true
|
||||
#################################### SMTP / Emailing ##########################
|
||||
[smtp]
|
||||
;enabled = false
|
||||
|
||||
@@ -445,7 +445,8 @@ type Cfg struct {
|
||||
DashboardPreviews DashboardPreviewsSettings
|
||||
|
||||
// Access Control
|
||||
RBACEnabled bool
|
||||
RBACEnabled bool
|
||||
RBACPermissionCache bool
|
||||
}
|
||||
|
||||
type CommandLineArgs struct {
|
||||
@@ -1358,6 +1359,7 @@ func readAuthSettings(iniFile *ini.File, cfg *Cfg) (err error) {
|
||||
func readAccessControlSettings(iniFile *ini.File, cfg *Cfg) {
|
||||
rbac := iniFile.Section("rbac")
|
||||
cfg.RBACEnabled = rbac.Key("enabled").MustBool(true)
|
||||
cfg.RBACPermissionCache = rbac.Key("permission_cache").MustBool(true)
|
||||
}
|
||||
|
||||
func readUserSettings(iniFile *ini.File, cfg *Cfg) error {
|
||||
|
||||
Reference in New Issue
Block a user