From ad4fe8024092e7b365ee0f6aba7a5987ca964d18 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 19 Jun 2024 09:52:59 +0200 Subject: [PATCH] Add fall-back right for ROLE_ADMIN Within the StoredObjectVoter.php also the admin\ user should be able to edit documents as a fall-back --- .../Security/Authorization/StoredObjectVoter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoter.php b/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoter.php index ecfc56615..781c2c542 100644 --- a/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoter.php +++ b/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoter.php @@ -60,7 +60,7 @@ class StoredObjectVoter extends Voter } // User role-based fallback - if ($this->security->isGranted('ROLE_USER')) { + if ($this->security->isGranted('ROLE_USER') || $this->security->isGranted('ROLE_ADMIN')) { return true; }