mirror of
https://github.com/nicolabs/ldap-plugin.git
synced 2025-09-07 05:14:24 +02:00
SecurityRealms can now better control the servlet filter chain.
(<a href="http://www.nabble.com/proposed-patch-to-expose-filters-through-SecurityRealms-tt21062397.html">report</a>) git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14203 71c3de6d-444a-0410-be80-ed276b4c234a Originally-Committed-As: 3922bb2319c2b0e6916f86234bfaf839763ce60c
This commit is contained in:
parent
66f8aacfb5
commit
78d5ce192c
|
@ -212,7 +212,7 @@ public class LDAPSecurityRealm extends SecurityRealm {
|
||||||
if(!(hudson.getSecurityRealm() instanceof LDAPSecurityRealm))
|
if(!(hudson.getSecurityRealm() instanceof LDAPSecurityRealm))
|
||||||
return null;
|
return null;
|
||||||
try {
|
try {
|
||||||
LdapUserDetails details = (LdapUserDetails) HudsonFilter.USER_DETAILS_SERVICE_PROXY.loadUserByUsername(u.getId());
|
LdapUserDetails details = (LdapUserDetails) hudson.getSecurityRealm().getSecurityComponents().userDetails.loadUserByUsername(u.getId());
|
||||||
Attribute mail = details.getAttributes().get("mail");
|
Attribute mail = details.getAttributes().get("mail");
|
||||||
if(mail==null) return null; // not found
|
if(mail==null) return null; // not found
|
||||||
return (String)mail.get();
|
return (String)mail.get();
|
||||||
|
|
Loading…
Reference in a new issue