Added allow_sign_up setting to auth.ldap to be able to disable automatic user creation for LDAP logins (#6191)

This commit is contained in:
Eric Perrino
2016-10-07 01:49:58 -05:00
committed by Torkel Ödegaard
parent 7e6595acaf
commit d3b0905899
4 changed files with 10 additions and 3 deletions

View File

@@ -134,8 +134,9 @@ var (
GoogleTagManagerId string
// LDAP
LdapEnabled bool
LdapConfigFile string
LdapEnabled bool
LdapConfigFile string
LdapAllowSignup bool = true
// SMTP email settings
Smtp SmtpSettings
@@ -551,6 +552,7 @@ func NewConfigContext(args *CommandLineArgs) error {
ldapSec := Cfg.Section("auth.ldap")
LdapEnabled = ldapSec.Key("enabled").MustBool(false)
LdapConfigFile = ldapSec.Key("config_file").String()
LdapAllowSignup = ldapSec.Key("allow_sign_up").MustBool(true)
alerting := Cfg.Section("alerting")
AlertingEnabled = alerting.Key("enabled").MustBool(false)