LDAP: consistently name the LDAP entities (#17203)
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/services/ldap"
|
||||
)
|
||||
|
||||
func (server *HTTPServer) ReloadLdapCfg() Response {
|
||||
func (server *HTTPServer) ReloadLDAPCfg() Response {
|
||||
if !ldap.IsEnabled() {
|
||||
return Error(400, "LDAP is not enabled", nil)
|
||||
}
|
||||
@@ -13,5 +13,5 @@ func (server *HTTPServer) ReloadLdapCfg() Response {
|
||||
if err != nil {
|
||||
return Error(500, "Failed to reload ldap config.", err)
|
||||
}
|
||||
return Success("Ldap config reloaded")
|
||||
return Success("LDAP config reloaded")
|
||||
}
|
||||
|
||||
+1
-1
@@ -395,7 +395,7 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
adminRoute.Post("/provisioning/dashboards/reload", Wrap(hs.AdminProvisioningReloadDasboards))
|
||||
adminRoute.Post("/provisioning/datasources/reload", Wrap(hs.AdminProvisioningReloadDatasources))
|
||||
adminRoute.Post("/provisioning/notifications/reload", Wrap(hs.AdminProvisioningReloadNotifications))
|
||||
adminRoute.Post("/ldap/reload", Wrap(hs.ReloadLdapCfg))
|
||||
adminRoute.Post("/ldap/reload", Wrap(hs.ReloadLDAPCfg))
|
||||
}, reqGrafanaAdmin)
|
||||
|
||||
// rendering
|
||||
|
||||
@@ -176,7 +176,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *m.ReqContext) (map[string]interf
|
||||
"appSubUrl": setting.AppSubUrl,
|
||||
"allowOrgCreate": (setting.AllowUserOrgCreate && c.IsSignedIn) || c.IsGrafanaAdmin,
|
||||
"authProxyEnabled": setting.AuthProxyEnabled,
|
||||
"ldapEnabled": setting.LdapEnabled,
|
||||
"ldapEnabled": setting.LDAPEnabled,
|
||||
"alertingEnabled": setting.AlertingEnabled,
|
||||
"alertingErrorOrTimeout": setting.AlertingErrorOrTimeout,
|
||||
"alertingNoDataOrNullValues": setting.AlertingNoDataOrNullValues,
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func SendResetPasswordEmail(c *m.ReqContext, form dtos.SendResetPasswordEmailForm) Response {
|
||||
if setting.LdapEnabled || setting.AuthProxyEnabled {
|
||||
if setting.LDAPEnabled || setting.AuthProxyEnabled {
|
||||
return Error(401, "Not allowed to reset password when LDAP or Auth Proxy is enabled", nil)
|
||||
}
|
||||
if setting.DisableLoginForm {
|
||||
|
||||
@@ -21,7 +21,7 @@ func GetTeamMembers(c *m.ReqContext) Response {
|
||||
member.AvatarUrl = dtos.GetGravatarUrl(member.Email)
|
||||
member.Labels = []string{}
|
||||
|
||||
if setting.IsEnterprise && setting.LdapEnabled && member.External {
|
||||
if setting.IsEnterprise && setting.LDAPEnabled && member.External {
|
||||
member.Labels = append(member.Labels, "LDAP")
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -202,7 +202,7 @@ func (hs *HTTPServer) ChangeActiveOrgAndRedirectToHome(c *m.ReqContext) {
|
||||
}
|
||||
|
||||
func ChangeUserPassword(c *m.ReqContext, cmd m.ChangeUserPasswordCommand) Response {
|
||||
if setting.LdapEnabled || setting.AuthProxyEnabled {
|
||||
if setting.LDAPEnabled || setting.AuthProxyEnabled {
|
||||
return Error(400, "Not allowed to change password when LDAP or Auth Proxy is enabled", nil)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user