summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-10 14:55:29 -0400
committerUnknwon <u@gogs.io>2015-09-10 14:55:29 -0400
commitcbd6276200751f4b64a203767f0f454c3346fca1 (patch)
tree9f0ad4f59e40dbb4f3cdad045611fce382fa9f8e /routers
parent52ec80fa18bf991c6356b7aa972a1d3983aa20c3 (diff)
parentb954a22ce28d74021f0d4896e281aabc93eed938 (diff)
downloadgitea-cbd6276200751f4b64a203767f0f454c3346fca1.tar.gz
gitea-cbd6276200751f4b64a203767f0f454c3346fca1.zip
Merge branch 'develop' of https://github.com/SergioBenitez/gogs into develop
# Conflicts: # modules/bindata/bindata.go
Diffstat (limited to 'routers')
-rw-r--r--routers/admin/auths.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/routers/admin/auths.go b/routers/admin/auths.go
index 3e552082ee..1f4be231e9 100644
--- a/routers/admin/auths.go
+++ b/routers/admin/auths.go
@@ -61,6 +61,8 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
var u core.Conversion
switch models.LoginType(form.Type) {
case models.LDAP:
+ fallthrough
+ case models.DLDAP:
u = &models.LDAPConfig{
Ldapsource: ldap.Ldapsource{
Name: form.Name,
@@ -68,13 +70,14 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
Port: form.Port,
UseSSL: form.UseSSL,
BindDN: form.BindDN,
+ UserDN: form.UserDN,
BindPassword: form.BindPassword,
UserBase: form.UserBase,
- Filter: form.Filter,
- AdminFilter: form.AdminFilter,
AttributeName: form.AttributeName,
AttributeSurname: form.AttributeSurname,
AttributeMail: form.AttributeMail,
+ Filter: form.Filter,
+ AdminFilter: form.AdminFilter,
Enabled: true,
},
}
@@ -149,6 +152,8 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
var config core.Conversion
switch models.LoginType(form.Type) {
case models.LDAP:
+ fallthrough
+ case models.DLDAP:
config = &models.LDAPConfig{
Ldapsource: ldap.Ldapsource{
Name: form.Name,
@@ -156,6 +161,7 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
Port: form.Port,
UseSSL: form.UseSSL,
BindDN: form.BindDN,
+ UserDN: form.UserDN,
BindPassword: form.BindPassword,
UserBase: form.UserBase,
AttributeName: form.AttributeName,