aboutsummaryrefslogtreecommitdiffstats
path: root/routers/admin/auths.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-10 19:02:57 -0500
committerUnknwon <u@gogs.io>2015-12-10 19:02:57 -0500
commit3d5d61778ac8fab981720b5f8b7fe75e2fb58434 (patch)
treed22e52c2cc8ad9fb948322252a594225cf1b71b2 /routers/admin/auths.go
parentddcc8d998c93d6e252319a82b116dbe553a919ad (diff)
downloadgitea-3d5d61778ac8fab981720b5f8b7fe75e2fb58434.tar.gz
gitea-3d5d61778ac8fab981720b5f8b7fe75e2fb58434.zip
#1938 #1374 disable password change for non-local users
Diffstat (limited to 'routers/admin/auths.go')
-rw-r--r--routers/admin/auths.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/routers/admin/auths.go b/routers/admin/auths.go
index baa5efe3d1..659b8fcf67 100644
--- a/routers/admin/auths.go
+++ b/routers/admin/auths.go
@@ -45,10 +45,10 @@ type AuthSource struct {
}
var authSources = []AuthSource{
- {models.LoginNames[models.LDAP], models.LDAP},
- {models.LoginNames[models.DLDAP], models.DLDAP},
- {models.LoginNames[models.SMTP], models.SMTP},
- {models.LoginNames[models.PAM], models.PAM},
+ {models.LoginNames[models.LOGIN_LDAP], models.LOGIN_LDAP},
+ {models.LoginNames[models.LOGIN_DLDAP], models.LOGIN_DLDAP},
+ {models.LoginNames[models.LOGIN_SMTP], models.LOGIN_SMTP},
+ {models.LoginNames[models.LOGIN_PAM], models.LOGIN_PAM},
}
func NewAuthSource(ctx *middleware.Context) {
@@ -56,8 +56,8 @@ func NewAuthSource(ctx *middleware.Context) {
ctx.Data["PageIsAdmin"] = true
ctx.Data["PageIsAdminAuthentications"] = true
- ctx.Data["type"] = models.LDAP
- ctx.Data["CurTypeName"] = models.LoginNames[models.LDAP]
+ ctx.Data["type"] = models.LOGIN_LDAP
+ ctx.Data["CurTypeName"] = models.LoginNames[models.LOGIN_LDAP]
ctx.Data["smtp_auth"] = "PLAIN"
ctx.Data["is_active"] = true
ctx.Data["AuthSources"] = authSources
@@ -115,11 +115,11 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
var config core.Conversion
switch models.LoginType(form.Type) {
- case models.LDAP, models.DLDAP:
+ case models.LOGIN_LDAP, models.LOGIN_DLDAP:
config = parseLDAPConfig(form)
- case models.SMTP:
+ case models.LOGIN_SMTP:
config = parseSMTPConfig(form)
- case models.PAM:
+ case models.LOGIN_PAM:
config = &models.PAMConfig{
ServiceName: form.PAMServiceName,
}
@@ -181,11 +181,11 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
var config core.Conversion
switch models.LoginType(form.Type) {
- case models.LDAP, models.DLDAP:
+ case models.LOGIN_LDAP, models.LOGIN_DLDAP:
config = parseLDAPConfig(form)
- case models.SMTP:
+ case models.LOGIN_SMTP:
config = parseSMTPConfig(form)
- case models.PAM:
+ case models.LOGIN_PAM:
config = &models.PAMConfig{
ServiceName: form.PAMServiceName,
}