LDAP: consistently name the LDAP entities (#17203)

This commit is contained in:
Oleg Gaidarenko
2019-05-22 15:30:03 +03:00
committed by GitHub
parent 87688930a2
commit 9b7f9dd9be
17 changed files with 71 additions and 71 deletions
+2 -2
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -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
View File
@@ -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 {
+1 -1
View File
@@ -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
View File
@@ -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)
}