public function actorHasPermissionsOnTarget(string $actorType, string $actorId, string $targetType, string $targetId, int $permissions)
    {
        foreach($this->elements as $k => $v) {
            if (
                $v->getActor()->getResourceType() === $actorType &&
                $v->getActor()->getId() === $actorId &&
                $v->getTarget()->getResourceType() === $targetType &&
                $v->getTarget()->getId() === $targetId &&
                $v->hasPermissions($permissions)
            ) {
                return true;
            }
        }

        return false;
    }