Acl
class Acl implements AuditableAclInterface, NotifyPropertyChanged
An ACL implementation.
Each object identity has exactly one associated ACL. Each ACL can have four different types of ACEs (class ACEs, object ACEs, class field ACEs, object field ACEs).
You should not iterate over the ACEs yourself, but instead use isGranted(), or isFieldGranted(). These will utilize an implementation of PermissionGrantingStrategy internally.
Methods
Constructor
Adds a property changed listener
Deletes a class-based ACE
Deletes a class-field-based ACE
Deletes an object-based ACE
Deletes an object-field-based ACE
Returns all class-based ACEs associated with this ACL
Returns all class-field-based ACEs associated with this ACL
Returns all object-based ACEs associated with this ACL
Returns all object-field-based ACEs associated with this ACL
Returns the primary key of this ACL
Returns the object identity associated with this ACL
Returns the parent ACL, or null if there is none.
Inserts a class-based ACE
Inserts a class-field-based ACE
Inserts an object-based ACE
Inserts an object-field-based ACE
Whether this ACL is inheriting ACEs from a parent ACL.
Determines whether field access is granted
Determines whether access is granted
Whether the ACL has loaded ACEs for all of the passed security identities
Implementation for the \Serializable interface
Implementation for the \Serializable interface
Sets whether entries are inherited
Updates a class-based ACE
Updates a class-field-based ACE
Updates an object-based ACE
Updates an object-field-based ACE
Updates auditing for class-based ACE
Updates auditing for class-field-based ACE
Updates auditing for object-based ACE
Updates auditing for object-field-based ACE
Details
at line line 58
__construct(int $id, ObjectIdentityInterface $objectIdentity, PermissionGrantingStrategyInterface $permissionGrantingStrategy, array $loadedSids = array(), bool $entriesInheriting)
Constructor
at line line 72
addPropertyChangedListener(PropertyChangedListener $listener)
Adds a property changed listener
at line line 80
deleteClassAce(int $index)
Deletes a class-based ACE
at line line 88
deleteClassFieldAce(int $index, string $field)
Deletes a class-field-based ACE
at line line 96
deleteObjectAce(int $index)
Deletes an object-based ACE
at line line 104
deleteObjectFieldAce(int $index, string $field)
Deletes an object-field-based ACE
at line line 112
array
getClassAces()
Returns all class-based ACEs associated with this ACL
at line line 120
array
getClassFieldAces(string $field)
Returns all class-field-based ACEs associated with this ACL
at line line 128
array
getObjectAces()
Returns all object-based ACEs associated with this ACL
at line line 136
array
getObjectFieldAces(string $field)
Returns all object-field-based ACEs associated with this ACL
at line line 144
int
getId()
Returns the primary key of this ACL
at line line 152
ObjectIdentityInterface
getObjectIdentity()
Returns the object identity associated with this ACL
at line line 160
AclInterface|null
getParentAcl()
Returns the parent ACL, or null if there is none.
at line line 168
insertClassAce(SecurityIdentityInterface $sid, int $mask, int $index, bool $granting = true, string $strategy = null)
Inserts a class-based ACE
at line line 176
insertClassFieldAce(string $field, SecurityIdentityInterface $sid, int $mask, int $index, bool $granting = true, string $strategy = null)
Inserts a class-field-based ACE
at line line 184
insertObjectAce(SecurityIdentityInterface $sid, int $mask, int $index, bool $granting = true, string $strategy = null)
Inserts an object-based ACE
at line line 192
insertObjectFieldAce(string $field, SecurityIdentityInterface $sid, int $mask, int $index, bool $granting = true, string $strategy = null)
Inserts an object-field-based ACE
at line line 200
bool
isEntriesInheriting()
Whether this ACL is inheriting ACEs from a parent ACL.
at line line 208
bool
isFieldGranted(string $field, array $masks, array $securityIdentities, bool $administrativeMode = false)
Determines whether field access is granted
at line line 216
bool
isGranted(array $masks, array $securityIdentities, bool $administrativeMode = false)
Determines whether access is granted
at line line 224
bool
isSidLoaded($sids)
Whether the ACL has loaded ACEs for all of the passed security identities
at line line 257
string
serialize()
Implementation for the \Serializable interface
at line line 277
unserialize(string $serialized)
Implementation for the \Serializable interface
at line line 296
setEntriesInheriting(bool $boolean)
Sets whether entries are inherited
at line line 307
setParentAcl(AclInterface $acl = null)
Sets the parent ACL
at line line 322
updateClassAce(int $index, int $mask, string $strategy = null)
Updates a class-based ACE
at line line 330
updateClassFieldAce(int $index, string $field, int $mask, string $strategy = null)
Updates a class-field-based ACE
at line line 338
updateObjectAce(int $index, int $mask, string $strategy = null)
Updates an object-based ACE
at line line 346
updateObjectFieldAce(int $index, string $field, int $mask, string $strategy = null)
Updates an object-field-based ACE
at line line 354
updateClassAuditing(int $index, bool $auditSuccess, bool $auditFailure)
Updates auditing for class-based ACE
at line line 362
updateClassFieldAuditing(int $index, string $field, bool $auditSuccess, bool $auditFailure)
Updates auditing for class-field-based ACE
at line line 374
updateObjectAuditing(int $index, bool $auditSuccess, bool $auditFailure)
Updates auditing for object-based ACE
at line line 382
updateObjectFieldAuditing(int $index, string $field, bool $auditSuccess, bool $auditFailure)
Updates auditing for object-field-based ACE