Skip to content

Commit

Permalink
Merge pull request #27 from punktDe/bugfix/access-on-empty-values
Browse files Browse the repository at this point in the history
BUGFIX: Correctly handle permissions on empty sites and dimensions
  • Loading branch information
daniellienert authored Nov 30, 2021
2 parents ec1a9ad + 72cea1d commit 42f6f5e
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 42f6f5e

Please sign in to comment.