PHP Class Sulu\Component\Security\Authorization\AccessControl\AccessControlManager

Inheritance: implements Sulu\Component\Security\Authorization\AccessControl\AccessControlManagerInterface
Show file Open project: sulu/sulu Class Usage Examples

Protected Properties

Property Type Description
$accessControlProviders Sulu\Component\Security\Authorization\AccessControl\AccessControlProviderInterface[]

Public Methods

Method Description
__construct ( Sulu\Component\Security\Authorization\MaskConverterInterface $maskConverter, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )
addAccessControlProvider ( Sulu\Component\Security\Authorization\AccessControl\AccessControlProviderInterface $accessControlProvider ) Adds a new AccessControlProvider.
getPermissions ( $type, $identifier )
getUserPermissionByArray ( $locale, $securityContext, $objectPermissionsByRole, Sulu\Component\Security\Authentication\UserInterface $user )
getUserPermissions ( SecurityCondition $securityCondition, Sulu\Component\Security\Authentication\UserInterface $user )
setPermissions ( $type, $identifier, $permissions )

Private Methods

Method Description
cumulatePermissions ( array $userPermission, array $permissions ) : mixed Merges all the true values for the given permission arrays.
getAccessControlProvider ( string $type ) : Sulu\Component\Security\Authorization\AccessControl\AccessControlProviderInterface Returns the AccessControlProvider, which supports the given type.
getUserObjectPermission ( SecurityCondition $securityCondition, Sulu\Component\Security\Authentication\UserInterface $user ) : array Returns the permissions for the given object for the given user.
getUserObjectPermissionByArray ( array $permissions, Sulu\Component\Security\Authentication\UserInterface $user ) : array Returns the permissions for the given permission array and the given user.
getUserRoleSecurityContextPermission ( string $locale, string $securityContext, Sulu\Bundle\SecurityBundle\Entity\UserRole $userRole, boolean $checkPermissionType ) : array Returns the permissions for the given security context for the given user role.
getUserSecurityContextPermissions ( string $locale, string $securityContext, Sulu\Component\Security\Authentication\UserInterface $user, boolean $checkPermissionType ) : array Returns the permissions for the given security context for the given user.
mapPermissions ( array $userPermission, array $permissions, callable $reduce ) : array
restrictPermissions ( array $userPermission, array $permissions ) : mixed Merges all the values for the given permission arrays. Only returns true if all values are true.

Method Details

__construct() public method

public __construct ( Sulu\Component\Security\Authorization\MaskConverterInterface $maskConverter, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )
$maskConverter Sulu\Component\Security\Authorization\MaskConverterInterface
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface

addAccessControlProvider() public method

Adds a new AccessControlProvider.
public addAccessControlProvider ( Sulu\Component\Security\Authorization\AccessControl\AccessControlProviderInterface $accessControlProvider )
$accessControlProvider Sulu\Component\Security\Authorization\AccessControl\AccessControlProviderInterface The AccessControlProvider to add

getPermissions() public method

public getPermissions ( $type, $identifier )

getUserPermissionByArray() public method

public getUserPermissionByArray ( $locale, $securityContext, $objectPermissionsByRole, Sulu\Component\Security\Authentication\UserInterface $user )
$user Sulu\Component\Security\Authentication\UserInterface

getUserPermissions() public method

public getUserPermissions ( SecurityCondition $securityCondition, Sulu\Component\Security\Authentication\UserInterface $user )
$securityCondition Sulu\Component\Security\Authorization\SecurityCondition
$user Sulu\Component\Security\Authentication\UserInterface

setPermissions() public method

public setPermissions ( $type, $identifier, $permissions )

Property Details

$accessControlProviders protected property

protected AccessControlProviderInterface[],Sulu\Component\Security\Authorization\AccessControl $accessControlProviders
return Sulu\Component\Security\Authorization\AccessControl\AccessControlProviderInterface[]