Skip to content

Commit

Permalink
Fix "Passing more than one Security attribute is not supported" in Ac…
Browse files Browse the repository at this point in the history
…cessDecisionManager #34
  • Loading branch information
scheb committed Nov 13, 2020
1 parent 396b453 commit 9c945c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bundle/Security/Authorization/TwoFactorAccessDecider.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ public function isAccessible(Request $request, TokenInterface $token): bool
return true;
}

if (null !== $attributes && $this->accessDecisionManager->decide($token, $attributes, $request)) {
// Compatibility for Symfony < 6.0, true flag to support multiple attributes
/** @psalm-suppress TooManyArguments */
if (null !== $attributes && $this->accessDecisionManager->decide($token, $attributes, $request, true)) {
return true;
}

Expand Down

0 comments on commit 9c945c4

Please sign in to comment.