Skip to content

Commit

Permalink
[JENKINS-34896] Skip searching users when
Browse files Browse the repository at this point in the history
searching for teams.
  • Loading branch information
samrocketman committed Oct 24, 2016
1 parent ce15460 commit 597ade3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java
Expand Up @@ -579,6 +579,10 @@ public DescriptorImpl getDescriptor() {
@Override
public UserDetails loadUserByUsername(String username)
throws UsernameNotFoundException, DataAccessException {
//username is in org*team format
if(username.indexOf(GithubOAuthGroupDetails.ORG_TEAM_SEPARATOR) >= 0 ) {
throw new UsernameNotFoundException("Using org*team format instead of username: " + username);
}

Authentication token = SecurityContextHolder.getContext().getAuthentication();

Expand Down

0 comments on commit 597ade3

Please sign in to comment.