Checks if specified resource is allowed
public isAllowed ( integer $resourceId, string $permissionId = null ) : boolean | null | ||
$resourceId | integer | The ID of the resource. |
$permissionId | string | optional The ID of the permission associated with resource. |
return | boolean | null | Returns true if access is allowed. If resource or permission isn't overridden it returns null. |
/** * {@inheritdoc} * @see Scalr\Acl\Role.RoleObject::isOverridden() */ public function isOverridden($resourceId, $permissionId = null) { $overridden = parent::isAllowed($resourceId, $permissionId) !== null; return $overridden; }