parent
eadf300985
commit
008debf267
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue