From e323937405673132f3aba67ed24a51a5648f7fa2 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 14 Jul 2022 10:26:26 +0200 Subject: [PATCH] Temporarily disable ACL on new exports --- src/Bundle/ChillMainBundle/Export/ExportManager.php | 4 ++++ .../Security/Authorization/AccompanyingPeriodVoter.php | 5 ----- src/Bundle/ChillPersonBundle/config/services/exports.yaml | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Export/ExportManager.php b/src/Bundle/ChillMainBundle/Export/ExportManager.php index f9964ea3b..ed24f1661 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportManager.php +++ b/src/Bundle/ChillMainBundle/Export/ExportManager.php @@ -568,6 +568,10 @@ class ExportManager 'role' => $role->getRole(), ]); + ///// Bypasse les autorisations qui empĂȘche d'afficher les nouveaux exports + return true; + ///// TODO supprimer le return true + return false; } } diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php index 3183e9055..f4387f40a 100644 --- a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php +++ b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php @@ -38,7 +38,6 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH self::TOGGLE_CONFIDENTIAL_ALL, self::TOGGLE_INTENSITY, self::RE_OPEN_COURSE, - self::STATS, ]; /** @@ -220,10 +219,6 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH return $token->getUser() === $subject->getUser(); } - if (self::STATS === $attribute) { - return true; - } - } return $this->voterHelper->voteOnAttribute($attribute, $subject, $token); diff --git a/src/Bundle/ChillPersonBundle/config/services/exports.yaml b/src/Bundle/ChillPersonBundle/config/services/exports.yaml index 23a62f914..521dbbf64 100644 --- a/src/Bundle/ChillPersonBundle/config/services/exports.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/exports.yaml @@ -1,5 +1,5 @@ services: - chill.person.export.export_count_person: + chill.person.export.count_person: class: Chill\PersonBundle\Export\Export\CountPerson arguments: - "@doctrine.orm.entity_manager"