Remove check to see if user is instance of User

The admin user would not be identified as a User.
This commit is contained in:
Julie Lenaerts 2024-07-01 12:20:21 +02:00
parent c9d2e37cee
commit 254122d125

View File

@ -40,10 +40,6 @@ abstract class AbstractStoredObjectVoter implements StoredObjectVoterInterface
public function voteOnAttribute(StoredObjectRoleEnum $attribute, StoredObject $subject, TokenInterface $token): bool
{
if (!$token->getUser() instanceof User) {
return false;
}
// Retrieve the related accompanying course document
$entity = $this->getRepository()->findAssociatedEntityToStoredObject($subject);