public function canUser($module, $function, ValueObject $object, $targets = null)
    {
        $permissionSets = $this->hasAccess($module, $function);
        if ($permissionSets === false || $permissionSets === true) {
            return $permissionSets;
        }

        return $this->repository->canUser($module, $function, $object, $targets);
    }
public function canUser($module, $function, ValueObject $object, $targets = null)
    {
        $permissionSets = $this->hasAccess($module, $function);
        if ($permissionSets === false || $permissionSets === true) {
            return $permissionSets;
        }

        return $this->repository->canUser($module, $function, $object, $targets);
    }
public function canUser ( $ module , $ function , ValueObject $ object , $ targets = null ) { $ permissionSets = $ this -> hasAccess ( $ module , $ function ) ; if ( $ permissionSets === false || $ permissionSets === true ) { return $ permissionSets ; } return $ this -> repository -> canUser ( $ module , $ function , $ object , $ targets ) ; }
Indicates if the current user is allowed to perform an action given by the function on the given
objects.

@param string $module The module, aka controller identifier to check permissions on
@param string $function The function, aka the controller action to check permissions on
@param \eZ\Publish\API\Repository\Values\ValueObject $object The object to check if the user has access to
@param mixed $targets The location, parent or "assignment" value object, or an array of the same

@return bool
Indicates if the current user is allowed to perform an action given by the function on the given objects .