Implement permissions in AsyncUploadVoter.php

This commit is contained in:
Julie Lenaerts 2024-07-01 15:37:47 +02:00
parent ac2f314395
commit 5b0babb9b0

View File

@ -36,6 +36,13 @@ final class AsyncUploadVoter extends Voter
return false;
}
//TODO get the StoredObject from the SignedUrl
/* match($subject->method) {
'GET' => $this->security->isGranted('SEE', $storedObject),
'PUT' => $this->security->isGranted('EDIT', $storedObject),
'POST' => $this->security->isGranted('ROLE_USER') || $this->security->isGranted('ROLE_ADMIN')
};*/
return $this->security->isGranted('ROLE_USER') || $this->security->isGranted('ROLE_ADMIN');
}
}