SAML: change the config option for making SAML UI accessible to org Admins (#67399)

* change from role grant overrides to SAML UI specific config option

* update permissions needed to access SAML UI

* PR feedback: change config name, change required perms to write, add a comment
This commit is contained in:
Ieva
2023-04-28 11:48:26 +01:00
committed by GitHub
parent 8b6160bc66
commit 533f8caafd
8 changed files with 22 additions and 111 deletions

View File

@@ -225,7 +225,8 @@ func (hs *HTTPServer) registerRoutes() {
}
if hs.License.FeatureEnabled("saml") && hs.Features.IsEnabled(featuremgmt.FlagAuthenticationConfigUI) {
r.Get("/admin/authentication/", authorize(reqGrafanaAdmin, ac.EvalPermission(ac.ActionSettingsRead, ac.ScopeSettingsAll)), hs.Index)
// TODO change the scope when we extend the auth UI to more providers
r.Get("/admin/authentication/", authorize(reqGrafanaAdmin, ac.EvalPermission(ac.ActionSettingsWrite, ac.ScopeSettingsSAML)), hs.Index)
}
// authed api