-
Notifications
You must be signed in to change notification settings - Fork 165
Private memberships can be used for authorization #48
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
Conversation
@@ -302,7 +302,14 @@ public GithubOAuthUserDetails getUserDetails(String username) { | |||
if (user != null) { | |||
List<GrantedAuthority> groups = new ArrayList<GrantedAuthority>(); | |||
try { | |||
for (GHOrganization ghOrganization : user.getOrganizations()) { | |||
GHPersonSet<GHOrganization> orgs; | |||
if(this.userName.equals(username)) { |
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.
If GitHub scopes don't include the ability to read teams, then all authorizations for a user are wiped. Need to fall back to the default method of determining authorizations publicly.
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
@cloudbeesci code review, please. |
I don't think anyone is monitoring that account. |
@daniel-beck ah, I thought you were responding because I at mentioned that account. I guess not :). Well then I'll just chill out and wait for code reviews to come in. |
71df210
to
af11e42
Compare
Private organization memberships can now be used for authorization. fixes [JENKINS-20845]
af11e42
to
8a741c4
Compare
This is now ready for code review. |
Our CI Jenkins uses GitHub enterprise to authenticate users. This doesn't work if your membership of the GDS organisation isn't public. Version 0.22 adds support for these users. See: https://issues.jenkins-ci.org/browse/JENKINS-20845 jenkinsci/github-oauth-plugin#48
Private organization memberships can now be used for authorization.
fixes JENKINS-20845