Skip to content

Commit ed96b84

Browse files
ngourdontechknowlogick
authored andcommitted
Set user search base field optional in DLDAP edit page (#6779) (#6789)
1 parent 7284829 commit ed96b84

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

docs/content/doc/features/authentication.en-us.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ Both the LDAP via BindDN and the simple auth LDAP share the following fields:
115115
- Example: `cn=%s,ou=Users,dc=mydomain,dc=com`
116116
- Example: `uid=%s,ou=Users,dc=mydomain,dc=com`
117117

118+
- User Search Base (optional)
119+
- The LDAP base at which user accounts will be searched for.
120+
- Example: `ou=Users,dc=mydomain,dc=com`
121+
118122
- User Filter **(required)**
119123
- An LDAP filter declaring when a user should be allowed to log in. The `%s`
120124
matching parameter will be substituted with login name given on sign-in

modules/auth/ldap/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ share the following fields:
9494
* Example: cn=%s,ou=Users,dc=mydomain,dc=com
9595
* Example: uid=%s,ou=Users,dc=mydomain,dc=com
9696

97+
* User Search Base (optional)
98+
* The LDAP base at which user accounts will be searched for.
99+
* Example: ou=Users,dc=mydomain,dc=com
100+
97101
* User Filter **(required)**
98102
* An LDAP filter declaring when a user should be allowed to log in. The `%s`
99103
matching parameter will be substituted with the user's username.

templates/admin/auth/edit.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
{{end}}
5959
<div class="{{if .Source.IsLDAP}}required{{end}} field">
6060
<label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
61-
<input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com" required>
61+
<input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com" {{if .Source.IsLDAP}}required{{end}}>
6262
</div>
6363
{{if .Source.IsDLDAP}}
6464
<div class="required field">

0 commit comments

Comments
 (0)