Skip to content

Commit

Permalink
[JENKINS-31612] creates the default filter and adds the new filter to…
Browse files Browse the repository at this point in the history
… the chain, so maintains the correct filter chain and unwarps access denied exceptions
  • Loading branch information
kuisathaverat committed Oct 13, 2016
1 parent 24f1413 commit dc7808b
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -31,12 +31,9 @@
import hudson.model.Descriptor;
import hudson.model.Hudson;
import hudson.model.User;
import hudson.security.GroupDetails;
import hudson.security.UserMayOrMayNotExistException;
import hudson.security.*;
import hudson.tasks.Mailer;
import hudson.tasks.Mailer.UserProperty;
import hudson.security.LDAPSecurityRealm;
import hudson.security.SecurityRealm;
import hudson.util.FormValidation;
import hudson.util.Scrambler;
import hudson.util.spring.BeanBuilder;
Expand Down Expand Up @@ -448,7 +445,7 @@ public String getLDAPURL() {

@Override
public Filter createFilter(FilterConfig filterConfig) {
return new Filter() {
Filter filter = new Filter() {
public void init(FilterConfig filterConfig) throws ServletException {
}

Expand Down Expand Up @@ -553,6 +550,8 @@ public void doFilter(ServletRequest request,
public void destroy() {
}
};
Filter defaultFilter = super.createFilter(filterConfig);
return new ChainedServletFilter(filter, defaultFilter);
}

@Override
Expand Down

0 comments on commit dc7808b

Please sign in to comment.