[Security] Add back ROLE_PREVIOUS_ADMIN to impersonated user

This commit is contained in:
Robin Chalas 2019-11-02 08:18:28 +01:00
parent daeb41adae
commit 64f4430cda

View File

@ -149,7 +149,7 @@ class SwitchUserListener
$this->userChecker->checkPostAuth($user);
$roles = $user->getRoles();
$roles[] = 'ROLE_PREVIOUS_ADMIN';
$token = new SwitchUserToken($user, $user->getPassword(), $this->providerKey, $roles, $token);
if (null !== $this->dispatcher) {