/** * Loads all policies from roles which are assigned to a user or to user groups to which the user belongs. * * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException if a user with the given id was not found * * @param mixed $userId * * @return \eZ\Publish\API\Repository\Values\User\Policy[] */ public function loadPoliciesByUserId($userId) { return $this->service->loadPoliciesByUserId($userId); }
/** * Search all policies which are applied to a given user * * @return \eZ\Publish\Core\REST\Server\Values\PolicyList */ public function listPoliciesForUser() { return new Values\PolicyList($this->roleService->loadPoliciesByUserId($this->request->query->get('userId')), $this->request->getPathInfo()); }