| @@ 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 | } |
|
| @@ 766-774 (lines=9) @@ | ||
| 763 | $objectAces = $acl->getObjectAces(); |
|
| 764 | ||
| 765 | /* @var AuditableEntryInterface $ace */ |
|
| 766 | foreach ($objectAces as $ace) { |
|
| 767 | $securityIdentity = $ace->getSecurityIdentity(); |
|
| 768 | if ( |
|
| 769 | $securityIdentity instanceof RoleSecurityIdentity && |
|
| 770 | ($ace->getMask() & MaskBuilder::MASK_VIEW != 0) |
|
| 771 | ) { |
|
| 772 | $roles[] = $securityIdentity->getRole(); |
|
| 773 | } |
|
| 774 | } |
|
| 775 | } catch (AclNotFoundException $e) { |
|
| 776 | // No ACL found... assume default |
|
| 777 | $roles = array('IS_AUTHENTICATED_ANONYMOUSLY'); |
|