Commit ba9ab238 authored by Brian Hatchet's avatar Brian Hatchet :speech_balloon:

Ignoring entities that don't support the methods used by permissions

1 merge request!350WIP: Epic/permissions 28
Pipeline #90373443 passed with stages
in 9 minutes and 36 seconds
......@@ -75,6 +75,14 @@ class Permissions implements \JsonSerializable
public function calculate(array $entities = []): void
{
foreach ($entities as $entity) {
if (
!method_exists($entity, 'getOwnerObj')
&& !method_exists($entity, 'getOwner')) {
continue;
}
if (!method_exists($entity, 'getOwnerGuid')) {
continue;
}
if ($entity) {
$this->entities[$entity->getGuid()] = $this->getRoleForEntity($entity);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment