mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 13:32:24 +00:00
in PrincipalSid constructor and other places there's getPrincipal().toString(), which would behave in underministic fashion if we return a Principal object from the getPrinciapl() method.
So to make this work consistently change it to return String. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6449 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
3382630865
commit
cd01b933a8
1 file changed
+3
-3
@@ -42,8 +42,8 @@ public final class ContainerAuthentication implements Authentication {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Principal getPrincipal() {
|
||||
return request.getUserPrincipal();
|
||||
public String getPrincipal() {
|
||||
return request.getUserPrincipal().getName();
|
||||
}
|
||||
|
||||
public boolean isAuthenticated() {
|
||||
@@ -55,7 +55,7 @@ public final class ContainerAuthentication implements Authentication {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return getPrincipal().getName();
|
||||
return getPrincipal();
|
||||
}
|
||||
|
||||
private static final GrantedAuthority[] ADMIN_AUTHORITY = {new GrantedAuthorityImpl("admin")};
|
||||
|
||||
Reference in new issue
Block a user