src/Rbac/PhpManager.php
public function checkAccess($userId, $permissionName, $params = [])
    {
        return $this->getAssignments($userId)
            ->then(function($assignments) use ($userId, $permissionName, $params) {
                if ($this->hasNoAssignments($assignments)) {
                    return reject(new Error("No assignments for '$userId'"));
                }

                return $this->checkAccessRecursive($userId, $permissionName, $params, $assignments);
            });
    }
public function checkAccess($userId, $permissionName, $params = [])
    {
        return $this->getAssignments($userId)
            ->then(function($assignments) use ($userId, $permissionName, $params) {
                if ($this->hasNoAssignments($assignments)) {
                    return reject(new Error("No assignments for '$userId'"));
                }

                return $this->checkAccessRecursive($userId, $permissionName, $params, $assignments);
            });
    }
{@inheritdoc}