From 6a1907d994c3beb7e604874d2cce3171b32b0baf Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 16 Sep 2015 12:15:14 -0400 Subject: [PATCH] revert simple LDAP userDN and update example --- gogs.go | 2 +- modules/auth/ldap/ldap.go | 4 ++-- templates/.VERSION | 2 +- templates/admin/auth/edit.tmpl | 2 +- templates/admin/auth/new.tmpl | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gogs.go b/gogs.go index 7d48abd27b..ebe37b1d5d 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.6.12.0914 Beta" +const APP_VER = "0.6.12.0916 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/modules/auth/ldap/ldap.go b/modules/auth/ldap/ldap.go index 1f87690526..382b5b8699 100644 --- a/modules/auth/ldap/ldap.go +++ b/modules/auth/ldap/ldap.go @@ -84,8 +84,8 @@ func (ls *Source) FindUserDN(name string) (string, bool) { func (ls *Source) SearchEntry(name, passwd string, directBind bool) (string, string, string, bool, bool) { var userDN string if directBind { - log.Trace("LDAP will bind directly via UserDN: %s", ls.UserDN) - userDN = ls.UserDN + log.Trace("LDAP will bind directly via UserDN template: %s", ls.UserDN) + userDN = fmt.Sprintf(ls.UserDN, name) } else { log.Trace("LDAP will use BindDN.") diff --git a/templates/.VERSION b/templates/.VERSION index 2bbb6d7403..b2b7e63fda 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.6.12.0914 Beta \ No newline at end of file +0.6.12.0916 Beta \ No newline at end of file diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 1cd647cc56..7423081bd0 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -52,7 +52,7 @@ {{if .Source.IsDLDAP}}
- +
{{end}}
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index 5b5a81acc9..d342b2df17 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -56,7 +56,7 @@
- +