SEC-1583: Added hasAuthority and hasAnyAuthority imlementations to SecurityExpressionRoot.
This commit is contained in:
@@ -36,6 +36,14 @@ public abstract class SecurityExpressionRoot {
|
||||
this.authentication = a;
|
||||
}
|
||||
|
||||
public final boolean hasAuthority(String authority) {
|
||||
return hasRole(authority);
|
||||
}
|
||||
|
||||
public final boolean hasAnyAuthority(String... authorities) {
|
||||
return hasAnyRole(authorities);
|
||||
}
|
||||
|
||||
public final boolean hasRole(String role) {
|
||||
return getAuthoritySet().contains(role);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user