@@ 338-350 (lines=13) @@ | ||
335 | * |
|
336 | * @return bool|int |
|
337 | */ |
|
338 | private function getObjectAceIndex(AclInterface $acl, $role) |
|
339 | { |
|
340 | $objectAces = $acl->getObjectAces(); |
|
341 | /* @var $ace AuditableEntryInterface */ |
|
342 | foreach ($objectAces as $index => $ace) { |
|
343 | $securityIdentity = $ace->getSecurityIdentity(); |
|
344 | if (($securityIdentity instanceof RoleSecurityIdentity) && $securityIdentity->getRole() == $role) { |
|
345 | return $index; |
|
346 | } |
|
347 | } |
|
348 | ||
349 | return false; |
|
350 | } |
|
351 | ||
352 | /** |
|
353 | * Get object ACE mask at specified index. |
|
@@ 360-371 (lines=12) @@ | ||
357 | * |
|
358 | * @return bool|int |
|
359 | */ |
|
360 | private function getMaskAtIndex(AclInterface $acl, $index) |
|
361 | { |
|
362 | $objectAces = $acl->getObjectAces(); |
|
363 | /* @var $ace AuditableEntryInterface */ |
|
364 | $ace = $objectAces[$index]; |
|
365 | $securityIdentity = $ace->getSecurityIdentity(); |
|
366 | if ($securityIdentity instanceof RoleSecurityIdentity) { |
|
367 | return $ace->getMask(); |
|
368 | } |
|
369 | ||
370 | return false; |
|
371 | } |
|
372 | } |
|
373 |