| @@ 131-136 (lines=6) @@ | ||
| 128 | $acl = $this->aclProvider->findAcl($objectIdentity); |
|
| 129 | $objectAces = $acl->getObjectAces(); |
|
| 130 | /* @var $ace AuditableEntryInterface */ |
|
| 131 | foreach ($objectAces as $ace) { |
|
| 132 | $securityIdentity = $ace->getSecurityIdentity(); |
|
| 133 | if ($securityIdentity instanceof RoleSecurityIdentity) { |
|
| 134 | $this->permissions[$securityIdentity->getRole()] = new MaskBuilder($ace->getMask()); |
|
| 135 | } |
|
| 136 | } |
|
| 137 | } catch (AclNotFoundException $e) { |
|
| 138 | // No Acl found - do nothing (or should we initialize with default values here?) |
|
| 139 | } |
|
| @@ 765-773 (lines=9) @@ | ||
| 762 | $objectAces = $acl->getObjectAces(); |
|
| 763 | ||
| 764 | /* @var AuditableEntryInterface $ace */ |
|
| 765 | foreach ($objectAces as $ace) { |
|
| 766 | $securityIdentity = $ace->getSecurityIdentity(); |
|
| 767 | if ( |
|
| 768 | $securityIdentity instanceof RoleSecurityIdentity && |
|
| 769 | ($ace->getMask() & MaskBuilder::MASK_VIEW != 0) |
|
| 770 | ) { |
|
| 771 | $roles[] = $securityIdentity->getRole(); |
|
| 772 | } |
|
| 773 | } |
|
| 774 | } catch (AclNotFoundException $e) { |
|
| 775 | // No ACL found... assume default |
|
| 776 | $roles = array('IS_AUTHENTICATED_ANONYMOUSLY'); |
|