Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit589828d

Browse files
committed
feature#5453 Cleanup security voters cookbook recipes (WouterJ)
This PR was merged into the 2.3 branch.Discussion----------Cleanup security voters cookbook recipes| Q | A| --- | ---| Doc fix? | yes| New docs? | no| Applies to | all| Fixed tickets |#5084Blacklisting using voters isn't a good practice and in fact, the article (`cookbook/security/voters`) was almost completely equal to the much newer voter article (`cookbook/security/voters_data_permission`). I've moved the only different piece (access decision strategy) to the newer voter article and then removed the old voter article.As the old voter article had a much nicer URL than the new one, I then renamed the new article to have the better name and set up a redirection. A [quick search on Google](https://www.google.nl/search?q=%5Blink%3Ahttp%3A%2F%2Fsymfony.com%2Fdoc%2Fcurrent%2Fcookbook%2Fsecurity%2Fvoters.html%5D+-site%3Ahttp%3A%2F%2Fsymfony.com) revealed that there are almost no links to the old article talking about blacklisting specifically, just about voters. So I think we're good here.The diff is horrible, that's why I've tried to create multiple commits (this will ease reviewing process). The only commit requiring review is9c169c7 (as the other 2 are just moving and removing stuff).Commits-------93484a7 Remove the old voter article9c169c7 Rewrite new sectionacf66f9 Move access decision strategy section
2 parents277b2e7 +93484a7 commit589828d

File tree

8 files changed

+219
-401
lines changed

8 files changed

+219
-401
lines changed

‎book/security.rst‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -929,10 +929,10 @@ other users. Also, as the admin user, you yourself want to be able to edit
929929

930930
To accomplish this you have 2 options:
931931

932-
*:doc:`Voters</cookbook/security/voters_data_permission>` allow you to
933-
use business logic(e.g. the user can edit this post because they were
934-
the creator) to determineaccess. You'll probably want this option - it's
935-
flexible enough to solve theabove situation.
932+
*:doc:`Voters</cookbook/security/voters>` allow you to use business logic
933+
(e.g. the user can edit this post because they were the creator) to determine
934+
access. You'll probably want this option - it's flexible enough to solve the
935+
above situation.
936936

937937
*:doc:`ACLs</cookbook/security/acl>` allow you to create a database structure
938938
where you can assign *any* arbitrary user *any* access (e.g. EDIT, VIEW)
@@ -1281,7 +1281,7 @@ Learn More from the Cookbook
12811281

12821282
*:doc:`Forcing HTTP/HTTPS</cookbook/security/force_https>`
12831283
*:doc:`Impersonating a User</cookbook/security/impersonating_user>`
1284-
*:doc:`/cookbook/security/voters_data_permission`
1284+
*:doc:`/cookbook/security/voters`
12851285
*:doc:`Access Control Lists (ACLs)</cookbook/security/acl>`
12861286
*:doc:`/cookbook/security/remember_me`
12871287
*:doc:`/cookbook/security/multiple_user_providers`

‎cookbook/map.rst.inc‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@
166166
* :doc:`Security Authorization (Denying Access) </cookbook/security/index>`
167167

168168
* :doc:`/cookbook/security/voters`
169-
* :doc:`/cookbook/security/voters_data_permission`
170169
* :doc:`/cookbook/security/acl`
171170
* :doc:`/cookbook/security/acl_advanced`
172171
* :doc:`/cookbook/security/force_https`

‎cookbook/security/acl.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ the ACL system comes in.
1414
Using ACL's isn't trivial, and for simpler use cases, it may be overkill.
1515
If your permission logic could be described by just writing some code (e.g.
1616
to check if a Blog is owned by the current User), then consider using
17-
:doc:`voters</cookbook/security/voters_data_permission>`. A voter is passed the object
17+
:doc:`voters</cookbook/security/voters>`. A voter is passed the object
1818
being voted on, which you can use to make complex decisions and effectively
1919
implement your own ACL. Enforcing authorization (e.g. the ``isGranted``
2020
part) will look similar to what you see in this entry, but your voter

‎cookbook/security/index.rst‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ Authorization (Denying Access)
2626
:maxdepth:2
2727

2828
voters
29-
voters_data_permission
3029
acl
3130
acl_advanced
3231
force_https
3332
securing_services
3433
access_control
35-

‎cookbook/security/voter_interface.rst.inc‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp