Skip to content

Commit

Permalink
[JENKINS-40201] Fix cached users breaking authz
Browse files Browse the repository at this point in the history
for GitHub organizations being used as a group in Jenkins.

Fixed bug introduced by #64.
  • Loading branch information
samrocketman committed Dec 3, 2016
1 parent ba07693 commit 52ecd0f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,13 @@ public Boolean call() throws Exception {
public GHUser loadUser(String username) throws IOException {
GithubUser user;
try {
user = usersByIdCache.get(username);
user = usersByIdCache.getIfPresent(username);
if (gh != null && user == null && isAuthenticated()) {
GHUser ghUser = getGitHub().getUser(username);
user = new GithubUser(ghUser);
usersByIdCache.put(username, user);
}
} catch (IOException | ExecutionException e) {
} catch (IOException e) {
LOGGER.log(Level.FINEST, e.getMessage(), e);
user = UNKNOWN_USER;
usersByIdCache.put(username, UNKNOWN_USER);
Expand Down

0 comments on commit 52ecd0f

Please sign in to comment.