When a PEP is defined solely in terms of role-based access (no resource is explicitly defined as the target of an access, and the access type is implicit somehow), then this method just performs the role check.
Syntax
boolean
checkRole
(
String
roleName
)
Parameters
-
roleName –
the name of the role
Returns
true if the current subject has the specified role, false if not.
Exceptions
-
IllegalArgumentException –
if the roleName cannot be resolved
-
IllegalStateException –
if there is no current authenticated subject or if the context has been destroyed..
Usage
true if the current subject has the specified role, false if not.