From d881c569fdb42087371d418543674dba61b0ff92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20L=C3=A9cluse?= <laurent.lecluse@unicaen.fr> Date: Mon, 30 Sep 2019 15:51:09 +0200 Subject: [PATCH] Migration de code vers BjyAuthorize --- Module.php | 8 ---- src/UnicaenAuth/Service/AuthorizeService.php | 44 -------------------- 2 files changed, 52 deletions(-) diff --git a/Module.php b/Module.php index 0172675..30c0f05 100644 --- a/Module.php +++ b/Module.php @@ -69,14 +69,6 @@ class Module implements AutoloaderProviderInterface, ConfigProviderInterface, Se /* @var $services \Zend\ServiceManager\ServiceManager */ $services = $application->getServiceManager(); - if ($services->has('BjyAuthorize\Service\Authorize')) { - // transmission des ACL aux aides de vue de navigation - $authorizeService = $services->get('BjyAuthorize\Service\Authorize'); - /* @var $authorizeService \BjyAuthorize\Service\Authorize */ - Navigation::setDefaultAcl($authorizeService->getAcl()); - Navigation::setDefaultRole($authorizeService->getIdentity()); - } - /* @var $options ModuleOptions */ $this->options = $services->get('unicaen-auth_module_options'); diff --git a/src/UnicaenAuth/Service/AuthorizeService.php b/src/UnicaenAuth/Service/AuthorizeService.php index 175110b..7baff94 100644 --- a/src/UnicaenAuth/Service/AuthorizeService.php +++ b/src/UnicaenAuth/Service/AuthorizeService.php @@ -13,18 +13,8 @@ class AuthorizeService extends \BjyAuthorize\Service\Authorize { use UserContextServiceAwareTrait; - /** - * Loading... - * - * @var boolean - */ - protected $loading; - /** - * @deprecated this method will be removed in BjyAuthorize 1.4.x+, - * please retrieve the identity from the - * `BjyAuthorize\Provider\Identity\ProviderInterface` service * * @return string */ @@ -47,38 +37,4 @@ class AuthorizeService extends \BjyAuthorize\Service\Authorize return null; } - - - /** - * Retourne la liste des rĂ´les fournis par l'ensemble des providers - */ - public function getRoles() - { - $roles = []; - foreach ($this->roleProviders as $provider) { - $r = $provider->getRoles(); - foreach ($r as $role) { - $roles[$role->getRoleId()] = $role; - } - } - - return $roles; - } - - - - /** - * Initializes the service - * - * @internal - * - * @return void - */ - public function load() - { - $this->loading = true; - parent::load(); - $this->loading = false; - } - } -- GitLab