List allowed resource IDs by class

@param $resourceClass
@param $action

@return array Array of IDs whose class was $resourceClass
965871
public function listAllowedByClass($resourceClass, string $action = ''): array
    {
        $permissions = $this->groupPermissions->getResourcePermissionsByClass($resourceClass);
        $permitted = [];
        foreach ($permissions as $permission) {
            if (!$action || $permission->can($action)) {
                $permitted[] = $permission->getResourceId();
            }
        }

        return array_unique($permitted);
    }
537828
public function allowedActions($limitToClass = null)
    {
        $actions = parent::allowedActions($limitToClass);
        $defaultMapping = $this->stat('allowed_actions');
        $siteConfig = SiteConfig::current_site_config();
        foreach ($defaultMapping as $map) {
            $key = ucfirst($map . 'Action');
            if ($siteConfig->$key) {
                self::$allowed_actions[] = $siteConfig->$key;
            }
        }
        if (is_array($actions)) {
            return array_merge($actions, self::$allowed_actions);
        }

        return self::$allowed_actions;
    }
161986
public function getPermissions(User $user, array $resourceIds) {

        $results = array();
        $allRights = $this->getSupportedRights();

        foreach ($this->getInner() as $impl) {
            //Get rights not supported by implementation
            $notSupported = array_diff($allRights, $impl->getSupportedRights());
            $resourceRights = $impl->getPermissions($user, $resourceIds);
            $resourcesRights = [];
            foreach ($resourceRights as $uri => $resourceRight){
                $resourcesRights[$uri] = array_merge($notSupported, $resourceRight);
            }
            $results[] = $resourcesRights;
        }

        $rights = array();
        foreach ($resourceIds as $id) {
            $intersect = null;
            foreach ($results as $modelResult) {
                $intersect = is_null($intersect)
                    ? $modelResult[$id]
                    : array_intersect($intersect, $modelResult[$id]);
            }
            $rights[$id] = array_values($intersect);
        }
        
        return $rights;
    }
374465
protected function _actionIsEnabled($action)
    {
        $actions = $this->type['actions'];

        if (array_key_exists($action, $actions)) {
            return $actions[$action];
        }
        return true;
    }
292222
public function getFollowerResource($userId, $resourceId, $resourceClass)
    {
        $followerResource = $this->getFollowerResourceRepository()->findOneBy(
            [
                'followerId' => $userId,
                'hash' => $this->getHash($resourceId, $resourceClass),
            ]
        );

        return $followerResource;
    }
1269887
protected function getMiddleware($instance, $action)
    {
        $results = array();
        $middleware = (array) $instance->getOption('middleware');
        foreach ($middleware as $class => $options) {
            if ((!isset($options['only']) || in_array($action, (array) $options['only'])) &&
                (!isset($options['except']) || !in_array($action, (array) $options['except']))
            ) {
                $results[$class] = $options;
            }
        }

        return $results;
    }
330382
public function getDataGrid(Action $action): DataGrid
    {
        return $this->dataGridRegistry->getDataGrid($this->getDataGridConfigCode($action));
    }
35307
protected function hasProperty(string $resourceClass, string $property): bool
    {
        return \in_array($property, iterator_to_array($this->getProperties($resourceClass)), true);
    }
885792
public function getActionIDs()
    {
        $actions = array_unique(preg_split('/[\s,]+/', $this->actions, -1, PREG_SPLIT_NO_EMPTY));
        sort($actions);

        return $actions;
    }
1349583
@com.fasterxml.jackson.annotation.JsonProperty("ResourceIds")
    public java.util.List<String> getResourceIds() {
        return resourceIds;
    }
772481
public function serialize(ResourceType $resourceType)
    {
        return [
            'id' => $resourceType->getId(),
            'name' => $resourceType->getName(),
            'class' => $resourceType->getClass(),
            'tags' => $resourceType->getTags(),
            'enabled' => $resourceType->isEnabled(),
            'actions' => array_map(function (MenuAction $resourceAction) {
                return [
                    'name' => $resourceAction->getName(),
                    'group' => $resourceAction->getGroup(),
                    'scope' => $resourceAction->getScope(),
                    'permission' => $resourceAction->getDecoder(),
                    'default' => $resourceAction->isDefault(),
                ];
            }, $this->actionManager->all($resourceType)),
        ];
    }
83834
public function hasResourceParams($controller, $action = null)
    {
        $this->buildAcl();
        $resource = $this->buildResource($controller, $action);
        return parent::hasResource($resource);
    }
444735
protected function getAllowedActions()
    {
        $allowed = $this->getAssignedActions()->filter(function (Action $action) {
            return $action->pivot->provision === 'pass';
        })->pluck('slug')->all();

        return $allowed;
    }
237093
public function get(ResourceNode $resourceNode, string $actionName)
    {
        $nodeActions = $this->all($resourceNode->getResourceType());
        foreach ($nodeActions as $current) {
            if ($actionName === $current->getName()) {
                return $current;
            }
        }

        return null;
    }
1196608
private function getResourceSerializerGroups(string $resourceClass): array
    {
        $serializerClassMetadata = $this->serializerClassMetadataFactory->getMetadataFor($resourceClass);

        $groups = [];
        foreach ($serializerClassMetadata->getAttributesMetadata() as $serializerAttributeMetadata) {
            $groups += array_flip($serializerAttributeMetadata->getGroups());
        }

        return array_keys($groups);
    }
893613
public function hasPermission(MenuAction $action, ResourceCollection $resourceNodes): bool
    {
        return $this->authorization->isGranted($action->getDecoder(), $resourceNodes);
    }
1279661
public function index($resourceId)
    {
        $parameters = $this->request->getParameters();
        $paginator = $this->repository
        ->setResource($resourceId)
        ->setRelation($this->relation())
        ->getPaginatedCollection($parameters);
        return $this->paginatedResponse($paginator);
    }