-
Bug
-
Resolution: Unresolved
-
Major
-
None
With GitLabSecurityRealm configured,
Jenkins.get().getSecurityRealm().loadUserByUsername("emilio");
throws
org.acegisecurity.userdetails.UsernameNotFoundException: user(emilio) is also an organization at org.jenkinsci.plugins.GitLabSecurityRealm.loadUserByUsername(GitLabSecurityRealm.java:529) at org.acegisecurity.userdetails.UserDetailsService$loadUserByUsername.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
Trying to load groups details, the plugin always returns one even if doesn't match with the requested
Jenkins.get().getSecurityRealm().loadGroupByGroupname("non-existing-group");
https://github.com/jenkinsci/gitlab-oauth-plugin/blob/master/src/main/java/org/jenkinsci/plugins/GitLabSecurityRealm.java#L577
https://github.com/jenkinsci/gitlab-oauth-plugin/blob/master/src/main/java/org/jenkinsci/plugins/GitLabAuthenticationToken.java#L302