mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
fix cs
This commit is contained in:
@@ -232,7 +232,6 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
|
||||
}
|
||||
|
||||
if (null !== $this->person && $this->person === $this->personOwner) {
|
||||
|
||||
$context->buildViolation('You cannot associate a resource with the same person')
|
||||
->addViolation();
|
||||
}
|
||||
|
@@ -102,7 +102,7 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
||||
'route' => 'chill_person_accompanying_course_close',
|
||||
'routeParameters' => [
|
||||
'accompanying_period_id' => $period->getId(),
|
||||
],])
|
||||
], ])
|
||||
->setExtras(['order' => 99999]);
|
||||
}
|
||||
}
|
||||
@@ -113,10 +113,9 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
||||
'route' => 'chill_person_accompanying_course_reopen',
|
||||
'routeParameters' => [
|
||||
'accompanying_period_id' => $period->getId(),
|
||||
],])
|
||||
], ])
|
||||
->setExtras(['order' => 99998]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static function getMenuIds(): array
|
||||
|
@@ -40,7 +40,7 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
||||
public const CREATE = 'CHILL_PERSON_ACCOMPANYING_PERIOD_CREATE';
|
||||
|
||||
/**
|
||||
* role to DELETE the course
|
||||
* role to DELETE the course.
|
||||
*
|
||||
* Will be true only for the creator, and if the course is still at DRAFT step.
|
||||
*/
|
||||
@@ -58,6 +58,14 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
||||
*/
|
||||
public const FULL = 'CHILL_PERSON_ACCOMPANYING_PERIOD_FULL';
|
||||
|
||||
/**
|
||||
* Reopen a closed course.
|
||||
*
|
||||
* This forward to the EDIT role, without taking into account that the course
|
||||
* is closed
|
||||
*/
|
||||
public const RE_OPEN_COURSE = 'CHILL_PERSON_ACCOMPANYING_PERIOD_REOPEN';
|
||||
|
||||
public const SEE = 'CHILL_PERSON_ACCOMPANYING_PERIOD_SEE';
|
||||
|
||||
/**
|
||||
@@ -67,14 +75,6 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
||||
*/
|
||||
public const SEE_DETAILS = 'CHILL_PERSON_ACCOMPANYING_PERIOD_SEE_DETAILS';
|
||||
|
||||
/**
|
||||
* Reopen a closed course.
|
||||
*
|
||||
* This forward to the EDIT role, without taking into account that the course
|
||||
* is closed
|
||||
*/
|
||||
public const RE_OPEN_COURSE = 'CHILL_PERSON_ACCOMPANYING_PERIOD_REOPEN';
|
||||
|
||||
public const TOGGLE_CONFIDENTIAL = 'CHILL_PERSON_ACCOMPANYING_PERIOD_TOGGLE_CONFIDENTIAL';
|
||||
|
||||
/**
|
||||
@@ -154,8 +154,8 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
||||
}
|
||||
|
||||
if (in_array($attribute, [
|
||||
self::SEE, self::SEE_DETAILS, self::EDIT
|
||||
])) {
|
||||
self::SEE, self::SEE_DETAILS, self::EDIT,
|
||||
], true)) {
|
||||
if ($subject->getUser() === $token->getUser()) {
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user