From 1b7ec67b73c319fc62ab57f9bec46be8a0374e37 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 31 Mar 2020 08:34:20 +0200 Subject: [PATCH] forward multiple attributes voting flag --- .../Core/Authorization/TraceableAccessDecisionManager.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php b/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php index 7690b3e2264b..7a9c4d0cfb23 100644 --- a/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php +++ b/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php @@ -47,8 +47,10 @@ public function __construct(AccessDecisionManagerInterface $manager) /** * {@inheritdoc} + * + * @param bool $allowMultipleAttributes Whether to allow passing multiple values to the $attributes array */ - public function decide(TokenInterface $token, array $attributes, $object = null): bool + public function decide(TokenInterface $token, array $attributes, $object = null/*, bool $allowMultipleAttributes = false*/): bool { $currentDecisionLog = [ 'attributes' => $attributes, @@ -58,7 +60,7 @@ public function decide(TokenInterface $token, array $attributes, $object = null) $this->currentLog[] = &$currentDecisionLog; - $result = $this->manager->decide($token, $attributes, $object); + $result = $this->manager->decide($token, $attributes, $object, 3 < \func_num_args() && func_get_arg(3)); $currentDecisionLog['result'] = $result;