Loading module/Application/src/Application/Assertion/These/TheseControllerAssertion.php +4 −8 Changes for module/Application/src/Application/Assertion/These/TheseControllerAssertion.php: 4 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -57,19 +57,15 @@ class TheseControllerAssertion implements ControllerAssertionInterface */ public function assert($controller, $action = null, $privilege = null) { if (! $this->these) { return false; switch (true) { case $this->selectedRoleIsDoctorant(): return $this->assertAsDoctorant($controller, $action); } if (! $this->isStructureDuRoleRespectee()) { return false; } switch (true) { case $this->selectedRoleIsDoctorant(): return $this->assertAsDoctorant($controller, $action); } // switch (true) { // case $this->actionIs($controller, $action, self::THESE_CONTROLLER, 'valider-rdv-bu'): // // aucune validation ne doit exister Loading Loading @@ -143,7 +139,7 @@ class TheseControllerAssertion implements ControllerAssertionInterface */ protected function isUtilisateurEstAuteurDeLaThese() { return $this->these->getDoctorant()->getId() === $this->getIdentityDoctorant()->getId(); return $this->these && $this->these->getDoctorant()->getId() === $this->getIdentityDoctorant()->getId(); } private function actionIs($controller, $action, $expectedController, $expectedAction) { Loading Loading
module/Application/src/Application/Assertion/These/TheseControllerAssertion.php +4 −8 Changes for module/Application/src/Application/Assertion/These/TheseControllerAssertion.php: 4 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -57,19 +57,15 @@ class TheseControllerAssertion implements ControllerAssertionInterface */ public function assert($controller, $action = null, $privilege = null) { if (! $this->these) { return false; switch (true) { case $this->selectedRoleIsDoctorant(): return $this->assertAsDoctorant($controller, $action); } if (! $this->isStructureDuRoleRespectee()) { return false; } switch (true) { case $this->selectedRoleIsDoctorant(): return $this->assertAsDoctorant($controller, $action); } // switch (true) { // case $this->actionIs($controller, $action, self::THESE_CONTROLLER, 'valider-rdv-bu'): // // aucune validation ne doit exister Loading Loading @@ -143,7 +139,7 @@ class TheseControllerAssertion implements ControllerAssertionInterface */ protected function isUtilisateurEstAuteurDeLaThese() { return $this->these->getDoctorant()->getId() === $this->getIdentityDoctorant()->getId(); return $this->these && $this->these->getDoctorant()->getId() === $this->getIdentityDoctorant()->getId(); } private function actionIs($controller, $action, $expectedController, $expectedAction) { Loading