Skip to content

Commit

Permalink
Merge pull request #60 from saifulferoz/fix/deprecations
Browse files Browse the repository at this point in the history
fix: remove deprecations
  • Loading branch information
ronisaha authored Nov 20, 2024
2 parents 55bd969 + a1d492d commit 2a977f1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Common/UserAwareComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ final protected function getImpersonatingUser()
return null;
}

if ($this->authChecker->isGranted('ROLE_PREVIOUS_ADMIN')) {
if ($this->authChecker->isGranted('IS_IMPERSONATOR')) {
return $this->getImpersonatingUserFromRole($token);
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/Common/UserAwareComponentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private function mockSecurityAuthChecker($isGranted = false)
{
$this->authChecker->expects($this->once())
->method('isGranted')
->with('ROLE_PREVIOUS_ADMIN')
->with('IS_IMPERSONATOR')
->willReturn($isGranted);
}
}
2 changes: 1 addition & 1 deletion Tests/Resolver/EventResolverFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ private function mockSecurityAuthChecker($isGranted = false)

$authChecker->expects($this->once())
->method('isGranted')
->with('ROLE_PREVIOUS_ADMIN')
->with('IS_IMPERSONATOR')
->willReturn($isGranted);

$this->resolverFactory->setAuthChecker($authChecker);
Expand Down

0 comments on commit 2a977f1

Please sign in to comment.