Commit c6bea5ff authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

COrrection bug de rémanence du rôle précédemment sélectionné dans UserContextService

parent 682971a3
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -24,24 +24,6 @@ class UserContextService extends BaseUserContextService
    use EtablissementServiceAwareTrait;
    use SourceCodeStringHelperAwareTrait;

    /**
     * @var RoleInterface
     */
    protected $selectedIdentityRole;

    /**
     * @return Role|RoleInterface|null
     */
    public function getSelectedIdentityRole()
    {
        if ($this->selectedIdentityRole === null) {
            $role = parent::getSelectedIdentityRole();
            $this->selectedIdentityRole = $this->roleAsEntity($role);
        }

        return $this->selectedIdentityRole;
    }

    private $roleAsEntityCache = [];

    /**