provide default Tomcat behavior
This commit is contained in:
Scott Battaglia 2012-09-20 22:20:48 -04:00
parent f40d38c1a3
commit 5dc1b363c9
2 changed files with 7 additions and 0 deletions

View File

@ -73,6 +73,9 @@ public class AssertionCasRealmDelegate implements CasRealm {
/** {@inheritDoc} */
public boolean hasRole(final Principal principal, final String role) {
if ("*".equals(role)) {
return true;
}
return getRoleCollection(principal).contains(role);
}

View File

@ -109,6 +109,10 @@ public class PropertiesCasRealmDelegate implements CasRealm {
/** {@inheritDoc} */
public boolean hasRole(final Principal principal, final String role) {
if ("*".equals(role)) {
return true;
}
final Set<String> roles = this.roleMap.get(principal.getName());
return roles != null && roles.contains(role);