Checks if the specified user has the specified role.
Syntax
int
checkRole
(
Map< String, Object >
context
,
String
roleName
,
SecSubject
subject
) throws SecException
Parameters
-
context –
runtime information relevant to this security context.
-
roleName –
the role to check
-
subject –
the subject for whom to check the role.
Returns
one of the VOTE_* contants from Const
Exceptions
-
SecException class –
Thrown if an error occurs. The exception will be logged and after that it is as if the method returned ABSTAIN.
Usage
If subject is null then the check is to be done for the "current" subject - whatever that means for the provider.
one of the VOTE_* contants from Const