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:
kohsuke 2009-01-06 18:06:26 +00:00
parent 66f8aacfb5
commit 78d5ce192c

View file

@ -212,7 +212,7 @@ public class LDAPSecurityRealm extends SecurityRealm {
if(!(hudson.getSecurityRealm() instanceof LDAPSecurityRealm))
return null;
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");
if(mail==null) return null; // not found
return (String)mail.get();