From 9c945c49a34417a18222c464de96fce8d78155f4 Mon Sep 17 00:00:00 2001 From: Christian Scheb Date: Fri, 13 Nov 2020 10:36:57 +0100 Subject: [PATCH] Fix "Passing more than one Security attribute is not supported" in AccessDecisionManager #34 --- src/bundle/Security/Authorization/TwoFactorAccessDecider.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bundle/Security/Authorization/TwoFactorAccessDecider.php b/src/bundle/Security/Authorization/TwoFactorAccessDecider.php index c50fbae0..b543cc0a 100644 --- a/src/bundle/Security/Authorization/TwoFactorAccessDecider.php +++ b/src/bundle/Security/Authorization/TwoFactorAccessDecider.php @@ -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; }