custom login hints via config file

This commit is contained in:
Haneysmith, Nathan
2015-08-20 11:15:36 -07:00
parent abd7c15ba8
commit 235bbc9c7e
5 changed files with 8 additions and 1 deletions
+1
View File
@@ -28,6 +28,7 @@ func LoginView(c *middleware.Context) {
settings["googleAuthEnabled"] = setting.OAuthService.Google
settings["githubAuthEnabled"] = setting.OAuthService.GitHub
settings["disableUserSignUp"] = !setting.AllowUserSignUp
settings["loginHint"] = setting.LoginHint
if !tryLoginUsingRememberCookie(c) {
c.HTML(200, VIEW_INDEX)
+2
View File
@@ -79,6 +79,7 @@ var (
AllowUserOrgCreate bool
AutoAssignOrg bool
AutoAssignOrgRole string
LoginHint string
// Http auth
AdminUser string
@@ -392,6 +393,7 @@ func NewConfigContext(args *CommandLineArgs) {
AllowUserOrgCreate = users.Key("allow_org_create").MustBool(true)
AutoAssignOrg = users.Key("auto_assign_org").MustBool(true)
AutoAssignOrgRole = users.Key("auto_assign_org_role").In("Editor", []string{"Editor", "Admin", "Read Only Editor", "Viewer"})
LoginHint = users.Key("login_hint").String()
// anonymous access
AnonymousEnabled = Cfg.Section("auth.anonymous").Key("enabled").MustBool(false)