diff --git a/databox/api/src/Security/Voter/AssetVoter.php b/databox/api/src/Security/Voter/AssetVoter.php index 4df8543a6..7f94db0a4 100644 --- a/databox/api/src/Security/Voter/AssetVoter.php +++ b/databox/api/src/Security/Voter/AssetVoter.php @@ -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')