diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php index 6bbea361fd098..86841d88fa9f8 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php @@ -79,16 +79,9 @@ public function vote(TokenInterface $token, $object, array $attributes) // as soon as at least one attribute is supported, default is to deny access $vote = self::ACCESS_DENIED; - if ($isNewOverwritten) { - if ($this->voteOnAttribute($attribute, $object, $token)) { - // grant access as soon as at least one voter returns a positive response - return self::ACCESS_GRANTED; - } - } else { - if ($this->isGranted($attribute, $object, $token->getUser())) { - // grant access as soon as at least one voter returns a positive response - return self::ACCESS_GRANTED; - } + if ($this->voteOnAttribute($attribute, $object, $token)) { + // grant access as soon as at least one voter returns a positive response + return self::ACCESS_GRANTED; } } @@ -146,6 +139,6 @@ protected function isGranted($attribute, $object, $user = null) */ protected function voteOnAttribute($attribute, $object, TokenInterface $token) { - return false; + return $this->isGranted($attribute, $object, $token->getUser()); } }