aboutsummaryrefslogtreecommitdiffstats
path: root/routers/admin/auths.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-03-24 19:04:16 -0400
committerUnknwon <u@gogs.io>2015-03-24 19:04:16 -0400
commit211596f407dbde1f755d0b309c7ecc707f116070 (patch)
tree0ee078c7b50fd7a286a1a730cec96887f467b18d /routers/admin/auths.go
parent9c67a193321a766097e6494484df5370010b512c (diff)
downloadgitea-211596f407dbde1f755d0b309c7ecc707f116070.tar.gz
gitea-211596f407dbde1f755d0b309c7ecc707f116070.zip
#1124 LDAP add and edit form are misleading
Diffstat (limited to 'routers/admin/auths.go')
-rw-r--r--routers/admin/auths.go30
1 files changed, 15 insertions, 15 deletions
diff --git a/routers/admin/auths.go b/routers/admin/auths.go
index dcb98d3303..b13b0bd134 100644
--- a/routers/admin/auths.go
+++ b/routers/admin/auths.go
@@ -74,15 +74,15 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
Filter: form.Filter,
MsAdSAFormat: form.MsAdSA,
Enabled: true,
- Name: form.AuthName,
+ Name: form.Name,
},
}
case models.SMTP:
u = &models.SMTPConfig{
- Auth: form.SmtpAuth,
- Host: form.SmtpHost,
- Port: form.SmtpPort,
- TLS: form.Tls,
+ Auth: form.SMTPAuth,
+ Host: form.SMTPHost,
+ Port: form.SMTPPort,
+ TLS: form.TLS,
}
default:
ctx.Error(400)
@@ -91,7 +91,7 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
var source = &models.LoginSource{
Type: models.LoginType(form.Type),
- Name: form.AuthName,
+ Name: form.Name,
IsActived: true,
AllowAutoRegister: form.AllowAutoRegister,
Cfg: u,
@@ -102,7 +102,7 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
return
}
- log.Trace("Authentication created by admin(%s): %s", ctx.User.Name, form.AuthName)
+ log.Trace("Authentication created by admin(%s): %s", ctx.User.Name, form.Name)
ctx.Redirect(setting.AppSubUrl + "/admin/auths")
}
@@ -156,15 +156,15 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
Filter: form.Filter,
MsAdSAFormat: form.MsAdSA,
Enabled: true,
- Name: form.AuthName,
+ Name: form.Name,
},
}
case models.SMTP:
config = &models.SMTPConfig{
- Auth: form.SmtpAuth,
- Host: form.SmtpHost,
- Port: form.SmtpPort,
- TLS: form.Tls,
+ Auth: form.SMTPAuth,
+ Host: form.SMTPHost,
+ Port: form.SMTPPort,
+ TLS: form.TLS,
}
default:
ctx.Error(400)
@@ -172,8 +172,8 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
}
u := models.LoginSource{
- Id: form.Id,
- Name: form.AuthName,
+ Id: form.ID,
+ Name: form.Name,
IsActived: form.IsActived,
Type: models.LoginType(form.Type),
AllowAutoRegister: form.AllowAutoRegister,
@@ -185,7 +185,7 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
return
}
- log.Trace("Authentication changed by admin(%s): %s", ctx.User.Name, form.AuthName)
+ log.Trace("Authentication changed by admin(%s): %s", ctx.User.Name, form.Name)
ctx.Flash.Success(ctx.Tr("admin.auths.update_success"))
ctx.Redirect(setting.AppSubUrl + "/admin/auths/" + ctx.Params(":authid"))
}