diff options
author | James Moger <james.moger@gitblit.com> | 2014-09-08 13:57:09 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-09-08 13:57:09 -0400 |
commit | 2f0fe2263e73f9bc04d043757883fa0aed3c2669 (patch) | |
tree | e2599f464d2ec7a43c9b462e1e8ab711a2ad9650 /src/main | |
parent | 0d7fbbfc6484e3dc9ae5596b6d3460a278f86d8c (diff) | |
download | gitblit-2f0fe2263e73f9bc04d043757883fa0aed3c2669.tar.gz gitblit-2f0fe2263e73f9bc04d043757883fa0aed3c2669.zip |
Allow LDAP to reset/delete an user email address value
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/gitblit/auth/LdapAuthProvider.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/auth/LdapAuthProvider.java b/src/main/java/com/gitblit/auth/LdapAuthProvider.java index a4d7bb05..5690073a 100644 --- a/src/main/java/com/gitblit/auth/LdapAuthProvider.java +++ b/src/main/java/com/gitblit/auth/LdapAuthProvider.java @@ -427,6 +427,10 @@ public class LdapAuthProvider extends UsernamePasswordAuthenticationProvider { Attribute attribute = userEntry.getAttribute(email); if (attribute != null && attribute.hasValue()) { user.emailAddress = attribute.getValue(); + } else { + // issue-456/ticket-134 + // allow LDAP to delete an email address + user.emailAddress = null; } } } |