Permalink
Browse files

Bug 399710 - [enterprise] Enterprise security component checks for ro…

…le with the wrong Principal object
  • Loading branch information...
1 parent 3f6f88a commit b54b3a0ca2127170924775c4eb6e19245a5eb568 @lkirchev lkirchev committed Feb 1, 2013
@@ -134,7 +134,8 @@ public boolean isCallerInRole(String role) {
final Set<TomcatUserWrapper> users = ((Subject)field.get(securityContext)).getPrincipals(TomcatUserWrapper.class);
boolean inRole = false;
for(TomcatUserWrapper user : users) {
- inRole = wrapper.getRealm().hasRole(wrapper, user, role);
+ inRole = wrapper.getRealm().hasRole(wrapper,
+ user.getTomcatPrincipal(), role);
if(inRole)
return true;
}

0 comments on commit b54b3a0

Please sign in to comment.