You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@trigger_error(sprintf("The AbstractVoter::isGranted method is deprecated since 2.8 and won't be called anymore in 3.0. Override voteOnAttribute() instead.", $reflector->class), E_USER_DEPRECATED);
77
-
}
78
-
79
73
foreach ($attributesas$attribute) {
80
74
if (!$this->supports($attribute, $class)) {
81
75
continue;
@@ -84,16 +78,9 @@ public function vote(TokenInterface $token, $object, array $attributes)
84
78
// as soon as at least one attribute is supported, default is to deny access
85
79
$vote = self::ACCESS_DENIED;
86
80
87
-
if ($isNewOverwritten) {
88
-
if ($this->voteOnAttribute($attribute, $object, $token)) {
89
-
// grant access as soon as at least one voter returns a positive response
90
-
returnself::ACCESS_GRANTED;
91
-
}
92
-
} else {
93
-
if ($this->isGranted($attribute, $object, $token->getUser())) {
94
-
// grant access as soon as at least one voter returns a positive response
95
-
returnself::ACCESS_GRANTED;
96
-
}
81
+
if ($this->voteOnAttribute($attribute, $object, $token)) {
82
+
// grant access as soon as at least one voter returns a positive response
83
+
returnself::ACCESS_GRANTED;
97
84
}
98
85
}
99
86
@@ -191,7 +178,8 @@ protected function getSupportedAttributes()
// the user should override this method, and not rely on the deprecated isGranted()
203
+
@trigger_error(sprintf("The AbstractVoter::isGranted() method is deprecated since 2.8 and won't be called anymore in 3.0. Override voteOnAttribute() in %s instead.", get_class($this)), E_USER_DEPRECATED);
0 commit comments