Auth: Move LDAP debug to Authentication menu (#71285)
* move LDAP page to Authentication * tweak Auth menu showing permissions
This commit is contained in:
@@ -121,12 +121,6 @@ func (s *ServiceImpl) getAdminNode(c *contextmodel.ReqContext) (*navtree.NavLink
|
||||
})
|
||||
}
|
||||
|
||||
if s.cfg.LDAPAuthEnabled && hasAccess(ac.EvalPermission(ac.ActionLDAPStatusRead)) {
|
||||
configNodes = append(configNodes, &navtree.NavLink{
|
||||
Text: "LDAP", Id: "ldap", Url: s.cfg.AppSubURL + "/admin/ldap", Icon: "book",
|
||||
})
|
||||
}
|
||||
|
||||
if hasAccess(ac.EvalPermission(ac.ActionSettingsRead, ac.ScopeSettingsAll)) && s.features.IsEnabled(featuremgmt.FlagStorage) {
|
||||
storage := &navtree.NavLink{
|
||||
Text: "Storage",
|
||||
@@ -157,8 +151,8 @@ func enableServiceAccount(s *ServiceImpl, c *contextmodel.ReqContext) bool {
|
||||
}
|
||||
|
||||
func evalAuthenticationSettings() ac.Evaluator {
|
||||
return ac.EvalAll(
|
||||
return ac.EvalAny(ac.EvalAll(
|
||||
ac.EvalPermission(ac.ActionSettingsWrite, ac.ScopeSettingsSAML),
|
||||
ac.EvalPermission(ac.ActionSettingsRead, ac.ScopeSettingsSAML),
|
||||
)
|
||||
), ac.EvalPermission(ac.ActionLDAPStatusRead))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user