JAccess::check
Method to check if a user is authorised to perform an action, optionally on an asset.
Signature
public function check(integer
$userId,
[string
$action = null,
[mixed
$asset = null]] )
Parameters
-
$userId
- Id of the user for which to check authorisation.
-
$action
- The name of the action to authorise.
-
$asset
- Integer asset id or the name of the asset as a string. Defaults to the global asset node.
Returns
- boolean
- True if authorised.