Allow configuration to disable the username and password login interface.

Used for when admins only want users to login via OAuth.
This commit is contained in:
Kevin Fitzpatrick
2016-04-07 11:25:05 -07:00
committed by Kevin Fitzpatrick
parent efad4bcb56
commit 040586604b
4 changed files with 14 additions and 10 deletions

View File

@@ -82,13 +82,14 @@ var (
ExternalEnabled bool
// User settings
AllowUserSignUp bool
AllowUserOrgCreate bool
AutoAssignOrg bool
AutoAssignOrgRole string
VerifyEmailEnabled bool
LoginHint string
DefaultTheme string
AllowUserSignUp bool
AllowUserOrgCreate bool
AutoAssignOrg bool
AutoAssignOrgRole string
VerifyEmailEnabled bool
LoginHint string
DefaultTheme string
DisableUserPassLogin bool
// Http auth
AdminUser string
@@ -485,6 +486,7 @@ func NewConfigContext(args *CommandLineArgs) error {
VerifyEmailEnabled = users.Key("verify_email_enabled").MustBool(false)
LoginHint = users.Key("login_hint").String()
DefaultTheme = users.Key("default_theme").String()
DisableUserPassLogin = users.Key("disable_user_pass_login").MustBool(false)
// anonymous access
AnonymousEnabled = Cfg.Section("auth.anonymous").Key("enabled").MustBool(false)