Skip to content

Commit 3db0312

Browse files
committed
minor #13818 Update authorization.rst (atailouloute)
This PR was merged into the 5.0 branch. Discussion ---------- Update authorization.rst The ExpressionVoter does not provide anymore the `roles` variables, `role_names` should be used Commits ------- 5b032d0 Update authorization.rst
2 parents ee7ced3 + 5b032d0 commit 3db0312

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/security/authorization.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ expressions have access to a number of
185185
$object = ...;
186186

187187
$expression = new Expression(
188-
'"ROLE_ADMIN" in roles or (not is_anonymous() and user.isSuperAdmin())'
188+
'"ROLE_ADMIN" in role_names or (not is_anonymous() and user.isSuperAdmin())'
189189
)
190190

191191
$vote = $expressionVoter->vote($token, $object, [$expression]);

0 commit comments

Comments
 (0)