Loading src/UnicaenAuth/Assertion/AbstractAssertion.php +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ abstract class AbstractAssertion implements AssertionInterface, ServiceLocatorAw public function getRole() { if (false === $this->role){ $sUserContext = $this->getServiceUserContext(); $sUserContext = $this->serviceUserContext; if ($sUserContext->getIdentity()) { $this->role = $sUserContext->getSelectedIdentityRole(); } Loading src/UnicaenAuth/Controller/UtilisateurController.php +0 −9 Original line number Diff line number Diff line Loading @@ -78,15 +78,6 @@ class UtilisateurController extends AbstractActionController $this->options = $options; } /** * @param UserContext $userContextService * @deprecated Utiliser UserContextServiceAwareTrait::setServiceUserContext() à la place, svp. */ public function setUserContextService(UserContext $userContextService) { $this->serviceUserContext = $userContextService; } /** * Traite les requêtes AJAX POST de sélection d'un profil utilisateur. * La sélection est mémorisé en session par le service AuthUserContext. Loading src/UnicaenAuth/Mouchard/MouchardCompleterAuth.php +3 −2 Original line number Diff line number Diff line Loading @@ -17,17 +17,18 @@ class MouchardCompleterAuth implements MouchardCompleterInterface use UserContextServiceAwareTrait; /** * @param MouchardMessage $message * @return $this */ public function complete(MouchardMessage $message) { $user = $this->getServiceUserContext()->getDbUser(); $user = $this->serviceUserContext->getDbUser(); if ($user){ $message->setUser($user->getDisplayName()); $message->setLogin($user->getUsername()); } $message->setRole((string)$this->getServiceUserContext()->getSelectedIdentityRole()); $message->setRole((string)$this->serviceUserContext->getSelectedIdentityRole()); return $this; } Loading src/UnicaenAuth/Service/AuthorizeService.php +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ class AuthorizeService extends \BjyAuthorize\Service\Authorize if ($this->loading) return 'bjyauthorize-identity'; // on retourne par défaut le rôle sélectionné $role = $this->getServiceUserContext()->getSelectedIdentityRole(); $role = $this->serviceUserContext->getSelectedIdentityRole(); if ($role) return $role; $roles = $this->getIdentityProvider()->getIdentityRoles(); Loading src/UnicaenAuth/Service/Traits/UserContextServiceAwareTrait.php +2 −19 Original line number Diff line number Diff line Loading @@ -3,25 +3,19 @@ namespace UnicaenAuth\Service\Traits; use UnicaenAuth\Service\UserContext; use RuntimeException; /** * Description of UserContextServiceAwareTrait * * @author Laurent LÉCLUSE <laurent.lecluse at unicaen.fr> * @author Unicaen */ trait UserContextServiceAwareTrait { /** * @var UserContext */ private $serviceUserContext; protected $serviceUserContext; /** * @param UserContext $serviceUserContext * * @return self */ public function setServiceUserContext(UserContext $serviceUserContext) Loading @@ -30,15 +24,4 @@ trait UserContextServiceAwareTrait return $this; } /** * @return UserContext * @throws RuntimeException */ public function getServiceUserContext() { return $this->serviceUserContext; } } No newline at end of file Loading
src/UnicaenAuth/Assertion/AbstractAssertion.php +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ abstract class AbstractAssertion implements AssertionInterface, ServiceLocatorAw public function getRole() { if (false === $this->role){ $sUserContext = $this->getServiceUserContext(); $sUserContext = $this->serviceUserContext; if ($sUserContext->getIdentity()) { $this->role = $sUserContext->getSelectedIdentityRole(); } Loading
src/UnicaenAuth/Controller/UtilisateurController.php +0 −9 Original line number Diff line number Diff line Loading @@ -78,15 +78,6 @@ class UtilisateurController extends AbstractActionController $this->options = $options; } /** * @param UserContext $userContextService * @deprecated Utiliser UserContextServiceAwareTrait::setServiceUserContext() à la place, svp. */ public function setUserContextService(UserContext $userContextService) { $this->serviceUserContext = $userContextService; } /** * Traite les requêtes AJAX POST de sélection d'un profil utilisateur. * La sélection est mémorisé en session par le service AuthUserContext. Loading
src/UnicaenAuth/Mouchard/MouchardCompleterAuth.php +3 −2 Original line number Diff line number Diff line Loading @@ -17,17 +17,18 @@ class MouchardCompleterAuth implements MouchardCompleterInterface use UserContextServiceAwareTrait; /** * @param MouchardMessage $message * @return $this */ public function complete(MouchardMessage $message) { $user = $this->getServiceUserContext()->getDbUser(); $user = $this->serviceUserContext->getDbUser(); if ($user){ $message->setUser($user->getDisplayName()); $message->setLogin($user->getUsername()); } $message->setRole((string)$this->getServiceUserContext()->getSelectedIdentityRole()); $message->setRole((string)$this->serviceUserContext->getSelectedIdentityRole()); return $this; } Loading
src/UnicaenAuth/Service/AuthorizeService.php +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ class AuthorizeService extends \BjyAuthorize\Service\Authorize if ($this->loading) return 'bjyauthorize-identity'; // on retourne par défaut le rôle sélectionné $role = $this->getServiceUserContext()->getSelectedIdentityRole(); $role = $this->serviceUserContext->getSelectedIdentityRole(); if ($role) return $role; $roles = $this->getIdentityProvider()->getIdentityRoles(); Loading
src/UnicaenAuth/Service/Traits/UserContextServiceAwareTrait.php +2 −19 Original line number Diff line number Diff line Loading @@ -3,25 +3,19 @@ namespace UnicaenAuth\Service\Traits; use UnicaenAuth\Service\UserContext; use RuntimeException; /** * Description of UserContextServiceAwareTrait * * @author Laurent LÉCLUSE <laurent.lecluse at unicaen.fr> * @author Unicaen */ trait UserContextServiceAwareTrait { /** * @var UserContext */ private $serviceUserContext; protected $serviceUserContext; /** * @param UserContext $serviceUserContext * * @return self */ public function setServiceUserContext(UserContext $serviceUserContext) Loading @@ -30,15 +24,4 @@ trait UserContextServiceAwareTrait return $this; } /** * @return UserContext * @throws RuntimeException */ public function getServiceUserContext() { return $this->serviceUserContext; } } No newline at end of file