Loading module/Application/config/others/doctorant.config.php +2 −3 Changes for module/Application/config/others/doctorant.config.php: 2 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -3,8 +3,8 @@ use Application\Controller\Factory\DoctorantControllerFactory; use Application\Provider\Privilege\DoctorantPrivileges; use Application\Service\Doctorant\DoctorantService; use Application\Service\Doctorant\DoctorantServiceFactory; use UnicaenAuth\Guard\PrivilegeController; use UnicaenAuth\Provider\Rule\PrivilegeRuleProvider; return [ 'bjyauthorize' => [ Loading Loading @@ -93,10 +93,9 @@ return [ ), 'service_manager' => [ 'invokables' => array( 'DoctorantService' => DoctorantService::class, ), 'factories' => [ 'DoctorantService' => DoctorantServiceFactory::class, ], 'aliases' => [ DoctorantService::class => 'DoctorantService', Loading module/Application/config/others/etablissement.config.php +3 Changes for module/Application/config/others/etablissement.config.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -161,6 +161,9 @@ return [ ], 'factories' => [ ], 'aliases' => [ EtablissementService::class => 'EtablissementService', ] ], 'controllers' => [ 'invokables' => [ Loading module/Application/src/Application/Authentication/Storage/AppStorage.php +1 −11 Changes for module/Application/src/Application/Authentication/Storage/AppStorage.php: 1 added line, 11 removed lines. Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ use Application\Entity\UserWrapper; use Application\Service\Doctorant\DoctorantServiceAwareTrait; use Application\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\Utilisateur\UtilisateurServiceAwareTrait; use Doctrine\ORM\NonUniqueResultException; use UnicaenApp\Exception\RuntimeException; use UnicaenAuth\Authentication\Storage\ChainableStorage; use UnicaenAuth\Authentication\Storage\ChainEvent; Loading Loading @@ -106,16 +105,7 @@ class AppStorage implements ChainableStorage return $this->doctorant; } $id = $this->userWrapper->getSupannId(); $domaineEtab = $this->userWrapper->getDomainFromEppn(); $etablissement = $this->getEtablissementService()->getRepository()->findOneByDomaine($domaineEtab); $sourceCode = $etablissement->prependPrefixTo($id); try { $this->doctorant = $this->doctorantService->getRepository()->findOneBySourceCode($sourceCode); } catch (NonUniqueResultException $e) { throw new RuntimeException("Plusieurs doctorants ont été trouvés avec le même source code: " . $sourceCode); } $this->doctorant = $this->doctorantService->findOneByUserWrapper($this->userWrapper); return $this->doctorant; } Loading module/Application/src/Application/Authentication/Storage/ChainServiceFactory.php +1 −4 Changes for module/Application/src/Application/Authentication/Storage/ChainServiceFactory.php: 1 added line, 4 removed lines. Original line number Diff line number Diff line Loading @@ -5,16 +5,13 @@ namespace Application\Authentication\Storage; use UnicaenAuth\Authentication\Storage\ChainServiceFactory as BaseChainServiceFactory; /** * Description of ChainAuthenticationStorageServiceFactory * Ajout d'un storage maison à ceux d'UnicaenAuth. * * @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr> */ class ChainServiceFactory extends BaseChainServiceFactory { protected $storages = [ 200 => 'UnicaenAuth\Authentication\Storage\Ldap', 100 => 'UnicaenAuth\Authentication\Storage\Db', 75 => 'UnicaenAuth\Authentication\Storage\Shib', 50 => 'Application\Authentication\Storage\AppStorage', ]; } No newline at end of file module/Application/src/Application/Controller/IndexController.php +5 Changes for module/Application/src/Application/Controller/IndexController.php: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -36,6 +36,11 @@ class IndexController extends AbstractController if ($this->identity() && count($this->userContextService->getSelectableIdentityRoles()) === 0) { // déconnexion applicative $this->zfcUserAuthentication()->getAuthAdapter()->resetAdapters(); $this->zfcUserAuthentication()->getAuthAdapter()->logoutAdapters(); $this->zfcUserAuthentication()->getAuthService()->clearIdentity(); return $this->redirect()->toRoute('not-allowed'); } Loading Loading
module/Application/config/others/doctorant.config.php +2 −3 Changes for module/Application/config/others/doctorant.config.php: 2 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -3,8 +3,8 @@ use Application\Controller\Factory\DoctorantControllerFactory; use Application\Provider\Privilege\DoctorantPrivileges; use Application\Service\Doctorant\DoctorantService; use Application\Service\Doctorant\DoctorantServiceFactory; use UnicaenAuth\Guard\PrivilegeController; use UnicaenAuth\Provider\Rule\PrivilegeRuleProvider; return [ 'bjyauthorize' => [ Loading Loading @@ -93,10 +93,9 @@ return [ ), 'service_manager' => [ 'invokables' => array( 'DoctorantService' => DoctorantService::class, ), 'factories' => [ 'DoctorantService' => DoctorantServiceFactory::class, ], 'aliases' => [ DoctorantService::class => 'DoctorantService', Loading
module/Application/config/others/etablissement.config.php +3 Changes for module/Application/config/others/etablissement.config.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -161,6 +161,9 @@ return [ ], 'factories' => [ ], 'aliases' => [ EtablissementService::class => 'EtablissementService', ] ], 'controllers' => [ 'invokables' => [ Loading
module/Application/src/Application/Authentication/Storage/AppStorage.php +1 −11 Changes for module/Application/src/Application/Authentication/Storage/AppStorage.php: 1 added line, 11 removed lines. Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ use Application\Entity\UserWrapper; use Application\Service\Doctorant\DoctorantServiceAwareTrait; use Application\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\Utilisateur\UtilisateurServiceAwareTrait; use Doctrine\ORM\NonUniqueResultException; use UnicaenApp\Exception\RuntimeException; use UnicaenAuth\Authentication\Storage\ChainableStorage; use UnicaenAuth\Authentication\Storage\ChainEvent; Loading Loading @@ -106,16 +105,7 @@ class AppStorage implements ChainableStorage return $this->doctorant; } $id = $this->userWrapper->getSupannId(); $domaineEtab = $this->userWrapper->getDomainFromEppn(); $etablissement = $this->getEtablissementService()->getRepository()->findOneByDomaine($domaineEtab); $sourceCode = $etablissement->prependPrefixTo($id); try { $this->doctorant = $this->doctorantService->getRepository()->findOneBySourceCode($sourceCode); } catch (NonUniqueResultException $e) { throw new RuntimeException("Plusieurs doctorants ont été trouvés avec le même source code: " . $sourceCode); } $this->doctorant = $this->doctorantService->findOneByUserWrapper($this->userWrapper); return $this->doctorant; } Loading
module/Application/src/Application/Authentication/Storage/ChainServiceFactory.php +1 −4 Changes for module/Application/src/Application/Authentication/Storage/ChainServiceFactory.php: 1 added line, 4 removed lines. Original line number Diff line number Diff line Loading @@ -5,16 +5,13 @@ namespace Application\Authentication\Storage; use UnicaenAuth\Authentication\Storage\ChainServiceFactory as BaseChainServiceFactory; /** * Description of ChainAuthenticationStorageServiceFactory * Ajout d'un storage maison à ceux d'UnicaenAuth. * * @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr> */ class ChainServiceFactory extends BaseChainServiceFactory { protected $storages = [ 200 => 'UnicaenAuth\Authentication\Storage\Ldap', 100 => 'UnicaenAuth\Authentication\Storage\Db', 75 => 'UnicaenAuth\Authentication\Storage\Shib', 50 => 'Application\Authentication\Storage\AppStorage', ]; } No newline at end of file
module/Application/src/Application/Controller/IndexController.php +5 Changes for module/Application/src/Application/Controller/IndexController.php: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -36,6 +36,11 @@ class IndexController extends AbstractController if ($this->identity() && count($this->userContextService->getSelectableIdentityRoles()) === 0) { // déconnexion applicative $this->zfcUserAuthentication()->getAuthAdapter()->resetAdapters(); $this->zfcUserAuthentication()->getAuthAdapter()->logoutAdapters(); $this->zfcUserAuthentication()->getAuthService()->clearIdentity(); return $this->redirect()->toRoute('not-allowed'); } Loading