Skip to content

Commit

Permalink
Remove hardcoded exception for SwitchUserToken
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgarlag committed Mar 6, 2020
1 parent c2cbb50 commit 7c39669
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,6 @@ private function hasUserChanged(UserInterface $user): bool
$currentUserRoles = array_map('strval', (array) $this->user->getRoles());
$userRoles = array_map('strval', (array) $user->getRoles());

if ($this instanceof SwitchUserToken) {
$userRoles[] = 'ROLE_PREVIOUS_ADMIN';
}

if (\count($userRoles) !== \count($currentUserRoles) || \count($userRoles) !== \count(array_intersect($userRoles, $currentUserRoles))) {
return true;
}
Expand Down

0 comments on commit 7c39669

Please sign in to comment.