revert simple LDAP userDN and update example
This commit is contained in:
parent
e303d74ab6
commit
6a1907d994
5 changed files with 6 additions and 6 deletions
2
gogs.go
2
gogs.go
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.6.12.0914 Beta"
|
const APP_VER = "0.6.12.0916 Beta"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
|
@ -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) {
|
func (ls *Source) SearchEntry(name, passwd string, directBind bool) (string, string, string, bool, bool) {
|
||||||
var userDN string
|
var userDN string
|
||||||
if directBind {
|
if directBind {
|
||||||
log.Trace("LDAP will bind directly via UserDN: %s", ls.UserDN)
|
log.Trace("LDAP will bind directly via UserDN template: %s", ls.UserDN)
|
||||||
userDN = ls.UserDN
|
userDN = fmt.Sprintf(ls.UserDN, name)
|
||||||
} else {
|
} else {
|
||||||
log.Trace("LDAP will use BindDN.")
|
log.Trace("LDAP will use BindDN.")
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.6.12.0914 Beta
|
0.6.12.0916 Beta
|
|
@ -52,7 +52,7 @@
|
||||||
{{if .Source.IsDLDAP}}
|
{{if .Source.IsDLDAP}}
|
||||||
<div class="required field">
|
<div class="required field">
|
||||||
<label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
|
<label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
|
||||||
<input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com" required>
|
<input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com" required>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="required field">
|
<div class="required field">
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="dldap required field {{if not (eq .type 5)}}hide{{end}}">
|
<div class="dldap required field {{if not (eq .type 5)}}hide{{end}}">
|
||||||
<label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
|
<label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
|
||||||
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com">
|
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com">
|
||||||
</div>
|
</div>
|
||||||
<div class="required field">
|
<div class="required field">
|
||||||
<label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
|
<label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
|
||||||
|
|
Reference in a new issue