PHP Trait Sulu\Component\Security\Authorization\AccessControl\SecuredEntityRepositoryTrait

Show file Open project: sulu/sulu

Protected Methods

Method Description
addAccessControl ( Doctrine\ORM\QueryBuilder $queryBuilder, Sulu\Component\Security\Authentication\UserInterface $user, integer $permission, string $entityClass, string $entityAlias ) Adds joins and conditions to the QueryBuilder in order to only return entities the given user is allowed to see.

Method Details

addAccessControl() protected method

Adds joins and conditions to the QueryBuilder in order to only return entities the given user is allowed to see.
protected addAccessControl ( Doctrine\ORM\QueryBuilder $queryBuilder, Sulu\Component\Security\Authentication\UserInterface $user, integer $permission, string $entityClass, string $entityAlias )
$queryBuilder Doctrine\ORM\QueryBuilder The instance of the QueryBuilder to adjust
$user Sulu\Component\Security\Authentication\UserInterface The user for which the access control is checked
$permission integer The permission mask for which is checked
$entityClass string The class of the entity of which the access control is checked
$entityAlias string The alias of the entity used in the query builder