This method is similar to checkAccess(String, SecResource, SecEnvironment), but you may explicitly present a Subject on whose behalf the access check is to be performed.
Syntax
boolean
checkAccess
(
String
action
,
SecResource
resource
,
SecSubject
subject
,
SecEnvironment
env
)
Parameters
-
action –
the operation the caller would like to perform on the resource.
-
resource –
target of the operation.
-
subject –
the subject for whom we are checking access.
-
env –
environmental attributes describing additional conditions relevant to the policy decision
Returns
true if access is allowed, false if access is denied.
Exceptions
-
IllegalStateException –
if the configured provider modules do not support the type of access check the caller is trying to perform or if the context has been destroyed.
Usage
true if access is allowed, false if access is denied.