- // Filter by page access if gallery
- if ($type === 'gallery') {
- $imageQuery = $this->restrictionService->filterRelatedEntity('page', $imageQuery, 'images', 'uploaded_to');
- }
-
- // Filter by entity if cover
- if (strpos($type, 'cover_') === 0) {
- $entityType = explode('_', $type)[1];
- $imageQuery = $this->restrictionService->filterRelatedEntity($entityType, $imageQuery, 'images', 'uploaded_to');
- }
+ // Filter by page access
+ $imageQuery = $this->restrictionService->filterRelatedEntity('page', $imageQuery, 'images', 'uploaded_to');