mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
cs fixes
This commit is contained in:
parent
16cca07e12
commit
5cf4013a99
@ -344,7 +344,6 @@ final class AccompanyingCourseApiController extends ApiController
|
|||||||
*/
|
*/
|
||||||
public function toggleIntensityApi(AccompanyingPeriod $accompanyingCourse, Request $request)
|
public function toggleIntensityApi(AccompanyingPeriod $accompanyingCourse, Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($request->getMethod() === 'POST') {
|
if ($request->getMethod() === 'POST') {
|
||||||
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::TOGGLE_INTENSITY, $accompanyingCourse);
|
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::TOGGLE_INTENSITY, $accompanyingCourse);
|
||||||
|
|
||||||
|
@ -131,17 +131,16 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (self::TOGGLE_CONFIDENTIAL === $attribute) {
|
if (self::TOGGLE_CONFIDENTIAL === $attribute) {
|
||||||
if (null != $subject->getUser() && ($subject->getUser() === $token->getUser())) {
|
if (null !== $subject->getUser() && ($subject->getUser() === $token->getUser())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// return $this->voterHelper->voteOnAttribute(self::TOGGLE_CONFIDENTIAL_ALL, $subject, $token);
|
// return $this->voterHelper->voteOnAttribute(self::TOGGLE_CONFIDENTIAL_ALL, $subject, $token);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self::TOGGLE_INTENSITY === $attribute) {
|
if (self::TOGGLE_INTENSITY === $attribute) {
|
||||||
if (null != $subject->getUser() && ($subject->getUser() === $token->getUser())) {
|
if (null !== $subject->getUser() && ($subject->getUser() === $token->getUser())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ use Symfony\Component\Validator\Constraint;
|
|||||||
*/
|
*/
|
||||||
class AccompanyingPeriodValidity extends 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 $messageSocialIssueCannotBeDeleted = 'The social %name% issue cannot be deleted because it is associated with an activity or an action';
|
||||||
|
|
||||||
public function getTargets()
|
public function getTargets()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user