diff options
author | Gary Moon <garymoon@users.noreply.github.com> | 2023-05-05 14:18:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 14:18:53 -0400 |
commit | b8c19e7a11525da4174b6f80f87ff3e844d03d8a (patch) | |
tree | b0cf7a236c68eae67ae7ecad6f7f548775926ffd /services | |
parent | 09dd4b42c7afe3f474d900b9d5856af2929a12ea (diff) | |
download | gitea-b8c19e7a11525da4174b6f80f87ff3e844d03d8a.tar.gz gitea-b8c19e7a11525da4174b6f80f87ff3e844d03d8a.zip |
Update LDAP filters to include both username and email address (#24547)
Since the login form label for user_name unconditionally displays
`Username or Email Address` for the `user_name` field, bring matching
LDAP filters to more prominence in the documentation/placeholders.
Signed-off-by: Gary Moon <gary@garymoon.net>
Diffstat (limited to 'services')
-rw-r--r-- | services/auth/source/ldap/README.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/services/auth/source/ldap/README.md b/services/auth/source/ldap/README.md index 59fc5cabad..568bc78275 100644 --- a/services/auth/source/ldap/README.md +++ b/services/auth/source/ldap/README.md @@ -81,9 +81,9 @@ share the following fields: * User Filter **(required)** * An LDAP filter declaring how to find the user record that is attempting to - authenticate. The '%s' matching parameter will be substituted with the + authenticate. The '%[1]s' matching parameter will be substituted with the user's username. - * Example: (&(objectClass=posixAccount)(uid=%s)) + * Example: (&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s))) **LDAP using simple auth** adds the following fields: @@ -98,10 +98,10 @@ share the following fields: * Example: ou=Users,dc=mydomain,dc=com * User Filter **(required)** - * An LDAP filter declaring when a user should be allowed to log in. The `%s` + * An LDAP filter declaring when a user should be allowed to log in. The `%[1]s` matching parameter will be substituted with the user's username. - * Example: (&(objectClass=posixAccount)(cn=%s)) - * Example: (&(objectClass=posixAccount)(uid=%s)) + * Example: (&(objectClass=posixAccount)(|(cn=%[1]s)(mail=%[1]s))) + * Example: (&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s))) **Verify group membership in LDAP** uses the following fields: |