eZ\Publish\Core\SignalSlot\Repository::canUser PHP Method

canUser() public method

Deprecation: since 6.6, to be removed. Use PermissionResolver::canUser() instead. Check if user has access to a given action on a given value object. Indicates if the current user is allowed to perform an action given by the function on the given objects.
public canUser ( string $module, string $function, eZ\Publish\API\Repository\Values\ValueObject $object, mixed $targets = null ) : boolean
$module string The module, aka controller identifier to check permissions on
$function string The function, aka the controller action to check permissions on
$object eZ\Publish\API\Repository\Values\ValueObject The object to check if the user has access to
$targets mixed The location, parent or "assignment" value object, or an array of the same
return boolean
    public function canUser($module, $function, ValueObject $object, $targets = null)
    {
        return $this->repository->canUser($module, $function, $object, $targets);
    }