mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 18:14:59 +00:00
FIX [delete][parcours] delete right removed from voter.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user