From 3b80d9a93b15d9981641ad7b80d7e301aeba1b6e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 4 Jul 2024 16:24:53 +0200 Subject: [PATCH] Delete voters that are not in use anymore --- .../ActivityStoredObjectVoter.php | 55 ------------------- .../EventStoredObjectVoter.php | 55 ------------------- .../PersonStoredObjectVoter.php | 55 ------------------- 3 files changed, 165 deletions(-) delete mode 100644 src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoters/ActivityStoredObjectVoter.php delete mode 100644 src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoters/EventStoredObjectVoter.php delete mode 100644 src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoters/PersonStoredObjectVoter.php diff --git a/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoters/ActivityStoredObjectVoter.php b/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoters/ActivityStoredObjectVoter.php deleted file mode 100644 index 4f897b36c..000000000 --- a/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoters/ActivityStoredObjectVoter.php +++ /dev/null @@ -1,55 +0,0 @@ -repository; - } - - protected function getClass(): string - { - return Activity::class; - } - - protected function attributeToRole(StoredObjectRoleEnum $attribute): string - { - return match ($attribute) { - StoredObjectRoleEnum::EDIT => ActivityVoter::UPDATE, - StoredObjectRoleEnum::SEE => ActivityVoter::SEE_DETAILS, - }; - } - - protected function canBeAssociatedWithWorkflow(): bool - { - return false; - } -} diff --git a/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoters/EventStoredObjectVoter.php b/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoters/EventStoredObjectVoter.php deleted file mode 100644 index d258b3ae3..000000000 --- a/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoters/EventStoredObjectVoter.php +++ /dev/null @@ -1,55 +0,0 @@ -repository; - } - - protected function getClass(): string - { - return Event::class; - } - - protected function attributeToRole(StoredObjectRoleEnum $attribute): string - { - return match ($attribute) { - StoredObjectRoleEnum::EDIT => EventVoter::UPDATE, - StoredObjectRoleEnum::SEE => EventVoter::SEE_DETAILS, - }; - } - - protected function canBeAssociatedWithWorkflow(): bool - { - return false; - } -} diff --git a/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoters/PersonStoredObjectVoter.php b/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoters/PersonStoredObjectVoter.php deleted file mode 100644 index 4d8a1220f..000000000 --- a/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoters/PersonStoredObjectVoter.php +++ /dev/null @@ -1,55 +0,0 @@ -repository; - } - - protected function getClass(): string - { - return PersonDocument::class; - } - - protected function attributeToRole(StoredObjectRoleEnum $attribute): string - { - return match ($attribute) { - StoredObjectRoleEnum::EDIT => PersonDocumentVoter::UPDATE, - StoredObjectRoleEnum::SEE => PersonDocumentVoter::SEE_DETAILS, - }; - } - - protected function canBeAssociatedWithWorkflow(): bool - { - return true; - } -}