diff options
author | Tony Homrich <tenacubus@gmail.com> | 2018-12-27 11:51:19 -0500 |
---|---|---|
committer | techknowlogick <hello@techknowlogick.com> | 2018-12-27 11:51:19 -0500 |
commit | 2058c362a8325790ed1f83163b233ce342d3789b (patch) | |
tree | 1bd54126b9e89e785738060f1f730a2dcc87d9fb /templates/admin | |
parent | 6e20b504b1d5f63b1835f2826d6cbaf2064f479d (diff) | |
download | gitea-2058c362a8325790ed1f83163b233ce342d3789b.tar.gz gitea-2058c362a8325790ed1f83163b233ce342d3789b.zip |
LDAP via simple auth separate bind user and search base (#5055)
Diffstat (limited to 'templates/admin')
-rw-r--r-- | templates/admin/auth/edit.tmpl | 6 | ||||
-rw-r--r-- | templates/admin/auth/source/ldap.tmpl | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 5c492ff521..8807657c33 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -55,11 +55,11 @@ <input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}"> <p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p> </div> - <div class="required field"> + {{end}} + <div class="{{if .Source.IsLDAP}}required{{end}} field"> <label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label> <input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com" required> - </div> - {{end}} + </div> {{if .Source.IsDLDAP}} <div class="required field"> <label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label> diff --git a/templates/admin/auth/source/ldap.tmpl b/templates/admin/auth/source/ldap.tmpl index 0c39d057a4..3386884ff1 100644 --- a/templates/admin/auth/source/ldap.tmpl +++ b/templates/admin/auth/source/ldap.tmpl @@ -30,7 +30,7 @@ <input id="bind_password" name="bind_password" type="password" value="{{.bind_password}}"> <p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p> </div> - <div class="ldap required field {{if not (eq .type 2)}}hide{{end}}"> + <div class="binddnrequired {{if (eq .type 2)}}required{{end}} field"> <label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label> <input id="user_base" name="user_base" value="{{.user_base}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com"> </div> |