-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate from Acegi compatibility layer to Spring Security 6.x #285
Conversation
@samrocketman Are you interested in testing this on a real Jenkins/GitHub installation? |
@Override | ||
public GrantedAuthority[] getAuthorities() { | ||
if (!hasGrantedAuthorities) { | ||
try { | ||
GHUser user = authenticationToken.loadUser(getUsername()); | ||
if(user != null) { | ||
setAuthorities(authenticationToken.getAuthorities()); | ||
} | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
return super.getAuthorities(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Spring Security 6.x, the parent class is immutable, so pushing this logic up to the caller.
Sure, there are a few ways I can test this. I’ll report back next week with some testing in AWS and locally on my machine. |
Hi @samrocketman, any luck testing this? |
@basil apologies I didn’t get around to testing this, got busy, and forgot. |
This plugin continues to work on 2.479.x LTS, but only through a number of old compatibility layers. This is inefficient, and we cannot keep supporting these compatibility layers forever. This PR migrates away from the compatibility layers to the latest Spring Security 6.x and Jenkins APIs.
Testing done
mvn clean verify
Submitter checklist