diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index d60e15e41..0219bb79a 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -973,14 +973,14 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac // accompanying period AccompanyingPeriodVoter::SEE_DETAILS => [AccompanyingPeriodVoter::SEE], AccompanyingPeriodVoter::CREATE => [AccompanyingPeriodVoter::SEE_DETAILS], - AccompanyingPeriodVoter::DELETE => [AccompanyingPeriodVoter::SEE_DETAILS], +// AccompanyingPeriodVoter::DELETE => [AccompanyingPeriodVoter::SEE_DETAILS], AccompanyingPeriodVoter::EDIT => [AccompanyingPeriodVoter::SEE_DETAILS], // give all ACL for FULL AccompanyingPeriodVoter::FULL => [ AccompanyingPeriodVoter::SEE_DETAILS, AccompanyingPeriodVoter::CREATE, AccompanyingPeriodVoter::EDIT, - AccompanyingPeriodVoter::DELETE, +// AccompanyingPeriodVoter::DELETE, ], AccompanyingPeriodVoter::REASSIGN_BULK => [ AccompanyingPeriodVoter::CONFIDENTIAL_CRUD, diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php index ea32326a4..e609301d4 100644 --- a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php +++ b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php @@ -34,7 +34,6 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH self::SEE_DETAILS, self::CREATE, self::EDIT, - self::DELETE, self::FULL, self::TOGGLE_CONFIDENTIAL_ALL, self::TOGGLE_INTENSITY, @@ -48,13 +47,6 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH public const CREATE = 'CHILL_PERSON_ACCOMPANYING_PERIOD_CREATE'; - /** - * role to DELETE the course. - * - * Will be true only for the creator, and if the course is still at DRAFT step. - */ - public const DELETE = 'CHILL_PERSON_ACCOMPANYING_PERIOD_DELETE'; - /** * role to EDIT the course. * @@ -132,7 +124,6 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH self::CONFIDENTIAL_CRUD, self::CREATE, self::EDIT, - self::DELETE, self::FULL, self::TOGGLE_CONFIDENTIAL_ALL, self::REASSIGN_BULK, @@ -163,7 +154,7 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH if ($subject instanceof AccompanyingPeriod) { if (AccompanyingPeriod::STEP_CLOSED === $subject->getStep()) { - if (in_array($attribute, [self::EDIT, self::DELETE], true)) { + if (in_array($attribute, [self::EDIT], true)) { return false; }