Skip to content

Commit

Permalink
BUGFIX: Correctly handle permissions on empty sites and dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellienert committed Nov 30, 2021
1 parent ec1a9ad commit 72cea1d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Classes/Domain/Repository/FormDataRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ function (FormData $formDataSample) {
return $this->siteAccesibilityService->isSiteAccessible($formDataSample->getSiteName()) ? $formDataSample->getSiteName() : null;
},
$this->findAllUnique('form.siteName')
));
), function (?string $value) {
return $value !== null;
});
}

protected function initializeAccessibleDimensions(): array
Expand All @@ -201,7 +203,9 @@ function (FormData $formDataSample) {
return $this->dimensionAccesibilityService->isDimensionCombinationAccessible($formDataSample->getContentDimensions()) ? $formDataSample->getDimensionsHash() : null;
},
$this->findAllUnique('form.dimensionsHash')
));
), function (?string $value) {
return $value !== null;
});
}

protected function findAllUnique(string $groupField): array
Expand Down

0 comments on commit 72cea1d

Please sign in to comment.