Skip to content

Commit

Permalink
PS-727 fix collection delete permission
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Nov 15, 2024
1 parent 3e024dd commit 05eb3ba
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions databox/api/src/Security/Voter/AssetVoter.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ protected function voteOnAttribute(string $attribute, $subject, TokenInterface $
return $isOwner()
|| $this->security->isGranted(self::SCOPE_PREFIX.'DELETE')
|| $this->hasAcl(PermissionInterface::DELETE, $subject, $token)
|| (
null !== $subject->getReferenceCollection()
&& $this->hasAcl(PermissionInterface::DELETE, $subject->getReferenceCollection(), $token)
);
|| $this->voteOnContainer($subject, AbstractVoter::DELETE);
case self::EDIT_PERMISSIONS:
return $isOwner()
|| $this->security->isGranted(self::SCOPE_PREFIX.'OWNER')
Expand Down

0 comments on commit 05eb3ba

Please sign in to comment.