[v10.1.x] Auth: lock down Grafana admin sync for SAML (#72839)

Auth: lock down Grafana admin sync for SAML (#72828)

lock down Grafana admin sync for SAML

(cherry picked from commit 3a2538c2ca)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
grafana-delivery-bot[bot]
2023-08-03 19:14:08 +03:00
committed by GitHub
co-authored by Ieva
parent cb1c3bf2b3
commit 197682a43e
2 changed files with 6 additions and 2 deletions
+2
View File
@@ -125,6 +125,8 @@ func IsGrafanaAdminExternallySynced(cfg *setting.Cfg, authModule string, oAuthAn
switch authModule {
case JWTModule:
return cfg.JWTAuthAllowAssignGrafanaAdmin
case SAMLAuthModule:
return cfg.SAMLRoleValuesGrafanaAdmin != ""
case LDAPAuthModule:
return true
default: