diff options
author | Sandro Santilli <strk@kbt.io> | 2016-11-07 17:38:43 +0100 |
---|---|---|
committer | Sandro Santilli <strk@kbt.io> | 2016-11-07 17:38:43 +0100 |
commit | 05fd9d3f096e53bcf80b73345d6fa567fbf017e6 (patch) | |
tree | f8626767c0759491625a9c8eb215cef3d2855163 /routers/admin | |
parent | 7612b5ec40955a5a0b4d281645e33a86d1632f70 (diff) | |
download | gitea-05fd9d3f096e53bcf80b73345d6fa567fbf017e6.tar.gz gitea-05fd9d3f096e53bcf80b73345d6fa567fbf017e6.zip |
Security protocols
Diffstat (limited to 'routers/admin')
-rw-r--r-- | routers/admin/auths.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/admin/auths.go b/routers/admin/auths.go index 7fbd1296a2..39c028ee07 100644 --- a/routers/admin/auths.go +++ b/routers/admin/auths.go @@ -54,9 +54,9 @@ var ( {models.LoginNames[models.LoginPam], models.LoginPam}, } securityProtocols = []dropdownItem{ - {models.SecurityProtocolNames[ldap.SECURITY_PROTOCOL_UNENCRYPTED], ldap.SECURITY_PROTOCOL_UNENCRYPTED}, - {models.SecurityProtocolNames[ldap.SECURITY_PROTOCOL_LDAPS], ldap.SECURITY_PROTOCOL_LDAPS}, - {models.SecurityProtocolNames[ldap.SECURITY_PROTOCOL_START_TLS], ldap.SECURITY_PROTOCOL_START_TLS}, + {models.SecurityProtocolNames[ldap.SecurityProtocolUnencrypted], ldap.SecurityProtocolUnencrypted}, + {models.SecurityProtocolNames[ldap.SecurityProtocolLdaps], ldap.SecurityProtocolLdaps}, + {models.SecurityProtocolNames[ldap.SecurityProtocolStartTls], ldap.SecurityProtocolStartTls}, } ) @@ -67,7 +67,7 @@ func NewAuthSource(ctx *context.Context) { ctx.Data["type"] = models.LoginLdap ctx.Data["CurrentTypeName"] = models.LoginNames[models.LoginLdap] - ctx.Data["CurrentSecurityProtocol"] = models.SecurityProtocolNames[ldap.SECURITY_PROTOCOL_UNENCRYPTED] + ctx.Data["CurrentSecurityProtocol"] = models.SecurityProtocolNames[ldap.SecurityProtocolUnencrypted] ctx.Data["smtp_auth"] = "PLAIN" ctx.Data["is_active"] = true ctx.Data["AuthSources"] = authSources @@ -127,7 +127,7 @@ func NewAuthSourcePost(ctx *context.Context, form auth.AuthenticationForm) { switch models.LoginType(form.Type) { case models.LoginLdap, models.LoginDldap: config = parseLDAPConfig(form) - hasTLS = ldap.SecurityProtocol(form.SecurityProtocol) > ldap.SECURITY_PROTOCOL_UNENCRYPTED + hasTLS = ldap.SecurityProtocol(form.SecurityProtocol) > ldap.SecurityProtocolUnencrypted case models.LoginSmtp: config = parseSMTPConfig(form) hasTLS = true |