diff options
author | Sandro Santilli <strk@kbt.io> | 2016-11-07 17:37:28 +0100 |
---|---|---|
committer | Sandro Santilli <strk@kbt.io> | 2016-11-07 17:37:28 +0100 |
commit | 7612b5ec40955a5a0b4d281645e33a86d1632f70 (patch) | |
tree | 1b8c649ee5a888cde7b94bfdec568e87d1eddf4c /routers/admin | |
parent | 64196d40361098568e6944e1b79bda5fe1e4ac06 (diff) | |
download | gitea-7612b5ec40955a5a0b4d281645e33a86d1632f70.tar.gz gitea-7612b5ec40955a5a0b4d281645e33a86d1632f70.zip |
More mixage
Diffstat (limited to 'routers/admin')
-rw-r--r-- | routers/admin/auths.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/routers/admin/auths.go b/routers/admin/auths.go index 44fe0ee9fb..7fbd1296a2 100644 --- a/routers/admin/auths.go +++ b/routers/admin/auths.go @@ -49,9 +49,9 @@ type dropdownItem struct { var ( authSources = []dropdownItem{ {models.LoginNames[models.LoginLdap], models.LoginLdap}, - {models.LoginNames[models.LOGIN_DLDAP], models.LOGIN_DLDAP}, - {models.LoginNames[models.LOGIN_SMTP], models.LOGIN_SMTP}, - {models.LoginNames[models.LOGIN_PAM], models.LOGIN_PAM}, + {models.LoginNames[models.LoginDldap], models.LoginDldap}, + {models.LoginNames[models.LoginSmtp], models.LoginSmtp}, + {models.LoginNames[models.LoginPam], models.LoginPam}, } securityProtocols = []dropdownItem{ {models.SecurityProtocolNames[ldap.SECURITY_PROTOCOL_UNENCRYPTED], ldap.SECURITY_PROTOCOL_UNENCRYPTED}, @@ -125,13 +125,13 @@ func NewAuthSourcePost(ctx *context.Context, form auth.AuthenticationForm) { hasTLS := false var config core.Conversion switch models.LoginType(form.Type) { - case models.LoginLdap, models.LOGIN_DLDAP: + case models.LoginLdap, models.LoginDldap: config = parseLDAPConfig(form) hasTLS = ldap.SecurityProtocol(form.SecurityProtocol) > ldap.SECURITY_PROTOCOL_UNENCRYPTED - case models.LOGIN_SMTP: + case models.LoginSmtp: config = parseSMTPConfig(form) hasTLS = true - case models.LOGIN_PAM: + case models.LoginPam: config = &models.PAMConfig{ ServiceName: form.PAMServiceName, } @@ -208,11 +208,11 @@ func EditAuthSourcePost(ctx *context.Context, form auth.AuthenticationForm) { var config core.Conversion switch models.LoginType(form.Type) { - case models.LoginLdap, models.LOGIN_DLDAP: + case models.LoginLdap, models.LoginDldap: config = parseLDAPConfig(form) - case models.LOGIN_SMTP: + case models.LoginSmtp: config = parseSMTPConfig(form) - case models.LOGIN_PAM: + case models.LoginPam: config = &models.PAMConfig{ ServiceName: form.PAMServiceName, } |