Commit 8d49f31d authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Adaptation à la factorisation des IP

parent a1db60b3
Loading
Loading
Loading
Loading
+2 −20
Original line number Diff line number Diff line
@@ -4,18 +4,14 @@ namespace Application\Provider;

use Application\Entity\Db\Agent;
use Application\Service\Agent\AgentServiceAwareTrait;
use Structure\Entity\Db\Structure;
use Structure\Service\Structure\StructureServiceAwareTrait;
use BjyAuthorize\Provider\Identity\ProviderInterface;
use UnicaenAuthentification\Provider\Identity\ChainableProvider;
use UnicaenAuthentification\Provider\Identity\ChainEvent;

use UnicaenUtilisateur\Entity\Db\RoleInterface;
use UnicaenUtilisateur\Entity\Db\User;
use UnicaenUtilisateur\Provider\Identity\AbstractIdentityProvider;
use UnicaenUtilisateur\Service\Role\RoleServiceAwareTrait;
use UnicaenUtilisateur\Service\User\UserServiceAwareTrait;

class IdentityProvider implements ProviderInterface, ChainableProvider
class IdentityProvider extends AbstractIdentityProvider
{
    use AgentServiceAwareTrait;
    use RoleServiceAwareTrait;
@@ -73,18 +69,4 @@ class IdentityProvider implements ProviderInterface, ChainableProvider
        return $roles;
    }

    /**
     * @return string[]|RoleInterface[]
     */
    public function getIdentityRoles()
    {
        return $this->computeRolesAutomatiques();
    }

    /**
     * @param ChainEvent $e
     */
    public function injectIdentityRoles(ChainEvent $e) {
        $e->addRoles($this->getIdentityRoles());
    }
}
 No newline at end of file
+2 −20
Original line number Diff line number Diff line
@@ -3,18 +3,15 @@
namespace EntretienProfessionnel\Provider;

use Application\Service\Agent\AgentServiceAwareTrait;
use BjyAuthorize\Provider\Identity\ProviderInterface;
use EntretienProfessionnel\Provider\Role\EntretienProfessionnelRoles;
use EntretienProfessionnel\Service\Delegue\DelegueServiceAwareTrait;
use UnicaenAuthentification\Provider\Identity\ChainableProvider;
use UnicaenAuthentification\Provider\Identity\ChainEvent;

use UnicaenUtilisateur\Entity\Db\RoleInterface;
use UnicaenUtilisateur\Entity\Db\User;
use UnicaenUtilisateur\Provider\Identity\AbstractIdentityProvider;
use UnicaenUtilisateur\Service\Role\RoleServiceAwareTrait;
use UnicaenUtilisateur\Service\User\UserServiceAwareTrait;

class IdentityProvider implements ProviderInterface, ChainableProvider
class IdentityProvider extends AbstractIdentityProvider
{
    use AgentServiceAwareTrait;
    use DelegueServiceAwareTrait;
@@ -58,19 +55,4 @@ class IdentityProvider implements ProviderInterface, ChainableProvider

        return $roles;
    }

    /**
     * @return string[]|RoleInterface[]
     */
    public function getIdentityRoles()
    {
        return $this->computeRolesAutomatiques();
    }

    /**
     * @param ChainEvent $e
     */
    public function injectIdentityRoles(ChainEvent $e) {
        $e->addRoles($this->getIdentityRoles());
    }
}
 No newline at end of file
+2 −18
Original line number Diff line number Diff line
@@ -5,16 +5,14 @@ namespace Structure\Provider;
use Application\Service\Agent\AgentServiceAwareTrait;
use Structure\Provider\Role\RoleProvider;
use Structure\Service\Structure\StructureServiceAwareTrait;
use BjyAuthorize\Provider\Identity\ProviderInterface;
use UnicaenAuthentification\Provider\Identity\ChainableProvider;
use UnicaenAuthentification\Provider\Identity\ChainEvent;

use UnicaenUtilisateur\Entity\Db\RoleInterface;
use UnicaenUtilisateur\Entity\Db\User;
use UnicaenUtilisateur\Provider\Identity\AbstractIdentityProvider;
use UnicaenUtilisateur\Service\Role\RoleServiceAwareTrait;
use UnicaenUtilisateur\Service\User\UserServiceAwareTrait;

class IdentityProvider implements ProviderInterface, ChainableProvider
class IdentityProvider extends AbstractIdentityProvider
{
    use AgentServiceAwareTrait;
    use RoleServiceAwareTrait;
@@ -67,18 +65,4 @@ class IdentityProvider implements ProviderInterface, ChainableProvider
        return $roles;
    }

    /**
     * @return string[]|RoleInterface[]
     */
    public function getIdentityRoles() : array
    {
        return $this->computeRolesAutomatiques();
    }

    /**
     * @param ChainEvent $e
     */
    public function injectIdentityRoles(ChainEvent $e) {
        $e->addRoles($this->getIdentityRoles());
    }
}
 No newline at end of file