Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Sep 26, 2023
1 parent b176c88 commit 814abbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion expose/api/src/Serializer/Normalizer/AssetNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct(private readonly Security $security)
*/
public function normalize($object, array &$context = []): void
{
if (in_array(Asset::GROUP_READ, $context['groups'])) {
if (in_array(Asset::GROUP_READ, $context['groups'] ?? [])) {
$publication = $object->getPublication();
$isAuthorized = $this->security->isGranted(PublicationVoter::READ_DETAILS, $publication);
$publication->setAuthorized($isAuthorized);
Expand Down

0 comments on commit 814abbe

Please sign in to comment.