public checkPermissions ( $args ) |
public function checkPermissions(...$args)
{
if (count($args) == 3) {
$message = array_pop($args);
} else {
$message = null;
}
$result = $this->hasPermissions(...$args);
if (!$result) {
throw new ApiInsufficientPermissionsException($message);
}
}
/** * Checks whether the authenticated user either is authorized to the specified object or has permission to ACL Role * * checkPermissions(object $obj, bool $modify = false, $errorMessage='') * checkPermissions(int $roleId, string $permissionId = null, $errorMessage='') * * @throws ApiInsufficientPermissionsException */ public function checkPermissions(...$args) { $this->app->checkPermissions(...$args); }