This commit is contained in:
Julie Lenaerts 2022-02-25 13:12:25 +01:00
parent 16cca07e12
commit 5cf4013a99
3 changed files with 2 additions and 5 deletions

View File

@ -344,7 +344,6 @@ final class AccompanyingCourseApiController extends ApiController
*/
public function toggleIntensityApi(AccompanyingPeriod $accompanyingCourse, Request $request)
{
if ($request->getMethod() === 'POST') {
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::TOGGLE_INTENSITY, $accompanyingCourse);

View File

@ -131,17 +131,16 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
}
if (self::TOGGLE_CONFIDENTIAL === $attribute) {
if (null != $subject->getUser() && ($subject->getUser() === $token->getUser())) {
if (null !== $subject->getUser() && ($subject->getUser() === $token->getUser())) {
return true;
}
return false;
// return $this->voterHelper->voteOnAttribute(self::TOGGLE_CONFIDENTIAL_ALL, $subject, $token);
}
if (self::TOGGLE_INTENSITY === $attribute) {
if (null != $subject->getUser() && ($subject->getUser() === $token->getUser())) {
if (null !== $subject->getUser() && ($subject->getUser() === $token->getUser())) {
return true;
}

View File

@ -18,7 +18,6 @@ use Symfony\Component\Validator\Constraint;
*/
class AccompanyingPeriodValidity extends Constraint
{
public $messageSocialIssueCannotBeDeleted = 'The social %name% issue cannot be deleted because it is associated with an activity or an action';
public function getTargets()