Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ee3ba84

Browse files
committed
Merge branch 'master' of github.com:symfony/symfony-docs
* 'master' of github.com:symfony/symfony-docs: added some missing entries draft for security config reference added a clarifying note for DBAL dependency Wrapped resource starting with @ in quotes to keep yaml file valid fixed typo in doctrine2 form integration chapter
2 parents e16cd64 + d40ad79 commit ee3ba84

File tree

6 files changed

+131
-24
lines changed

6 files changed

+131
-24
lines changed

guides/doctrine/orm/form.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ be chosen from::
6161

6262
$userChoices = array();
6363
$users = $em->getRepository('User')->findAll();
64-
foreach ($users AS $user) {
64+
foreach ($users as $user) {
6565
$userChoices[$user->id] = $user->name;
6666
}
6767

guides/map.rst.inc

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
* **Templating**:
22

3-
* `Twig`_ |
4-
* :doc:`PHP </guides/templating/PHP>` |
3+
* `Twig`_ |
4+
* :doc:`PHP </guides/templating/PHP>` |
55
* :doc:`Recipes </guides/templating/recipes>`
66

77
* **Doctrine**:
@@ -13,31 +13,32 @@
1313

1414
* **Testing**:
1515

16-
* :doc:`Overview </guides/testing/overview>` |
17-
* :doc:`Configuration </guides/testing/configuration>` |
18-
* :doc:`Crawler </guides/testing/crawler>` |
19-
* :doc:`Client </guides/testing/client>` |
16+
* :doc:`Overview </guides/testing/overview>` |
17+
* :doc:`Configuration </guides/testing/configuration>` |
18+
* :doc:`Crawler </guides/testing/crawler>` |
19+
* :doc:`Client </guides/testing/client>` |
2020
* :doc:`Recipes </guides/testing/recipes>`
2121

2222
* **Validation**:
2323

24-
* :doc:`Overview </guides/validator/overview>` |
25-
* :doc:`Validation </guides/validator/validation>` |
24+
* :doc:`Overview </guides/validator/overview>` |
25+
* :doc:`Validation </guides/validator/validation>` |
2626
* :doc:`/guides/validator/constraints`
2727

2828
* **Forms**:
2929

30-
* :doc:`Overview </guides/forms/overview>` |
30+
* :doc:`Overview </guides/forms/overview>` |
3131
* :doc:`Templates </guides/forms/view>`
3232

3333
* **Security**:
3434

35-
* :doc:`Overview </guides/security/overview>` |
36-
* :doc:`/guides/security/users` |
37-
* :doc:`/guides/security/authentication` |
38-
* :doc:`/guides/security/authorization` |
39-
* :doc:`ACLs </guides/security/acl>` |
40-
* :doc:`Advanced ACLs </guides/security/acl_advanced>`
35+
* :doc:`Overview </guides/security/overview>` |
36+
* :doc:`/guides/security/users` |
37+
* :doc:`/guides/security/authentication` |
38+
* :doc:`/guides/security/authorization` |
39+
* :doc:`ACLs </guides/security/acl>` |
40+
* :doc:`Advanced ACLs </guides/security/acl_advanced>` |
41+
* :doc:`Configuration Reference </guides/security/config_reference>`
4142

4243
* **Cache**:
4344

@@ -47,19 +48,19 @@
4748
* :doc:`/guides/translation`
4849
* **Event Dispatcher**:
4950

50-
* :doc:`Overview </guides/event/overview>` |
51+
* :doc:`Overview </guides/event/overview>` |
5152
* :doc:`Recipes </guides/event/recipes>`
5253

5354
* **Tools**:
5455

55-
* :doc:`/guides/tools/autoloader` |
56-
* :doc:`Finder </guides/tools/finder>` |
57-
* :doc:`/guides/tools/YAML` |
56+
* :doc:`/guides/tools/autoloader` |
57+
* :doc:`Finder </guides/tools/finder>` |
58+
* :doc:`/guides/tools/YAML` |
5859
* :doc:`Process </guides/tools/process>`
5960

6061
* **Bundles**:
6162

62-
* :doc:`Best Practices </guides/bundles/best_practices>` |
63+
* :doc:`Best Practices </guides/bundles/best_practices>` |
6364
* :doc:`Configuration </guides/bundles/configuration>`
6465

6566
* **Dependency Injection**:
@@ -68,8 +69,8 @@
6869

6970
* **Internals**:
7071

71-
* :doc:`Overview </guides/internals/overview>` |
72-
* :doc:`Kernel </guides/internals/kernel>` |
72+
* :doc:`Overview </guides/internals/overview>` |
73+
* :doc:`Kernel </guides/internals/kernel>` |
7374
* :doc:`Profiler </guides/internals/profiler>`
7475

7576
* :doc:`Symfony2 for symfony 1 users</guides/symfony1>`

guides/security/acl.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ First, we need to configure the connection the ACL system is supposed to use:
5858
));
5959
6060
61+
.. note::
62+
63+
The ACL system requires at least one Doctrine DBAL connection to be
64+
configured. However, that does not mean that you have to use Doctrine for
65+
mapping your domain objects. You can use whatever mapper you like for your
66+
objects, be it Doctrine ORM, Mongo ODM, Propel, or raw SQL, the choice is
67+
yours.
68+
6169
After the connection is configured. We have to import the database structure.
6270
Fortunately, we have a task for this. Simply run the following command:
6371

guides/security/config_reference.rst

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
.. index::
2+
single: Security; Configuration Reference
3+
4+
Configuration Reference
5+
=======================
6+
7+
.. configuration-block::
8+
9+
.. code-block:: yaml
10+
11+
# app/config/security.yml
12+
security.config:
13+
access_denied_url: /foo/error403
14+
15+
# strategy can be: none, migrate, invalidate
16+
session_fixation_strategy: migrate
17+
18+
encoders:
19+
MyBundle/Entity/MyUser: sha512
20+
MyBundle/Entity/MyUser: plaintext
21+
MyBundle/Entity/MyUser:
22+
algorithm: sha512
23+
encode_as_base64: true
24+
iterations: 5
25+
MyBundle/Entity/MyUser:
26+
service: my.custom.encoder.service.id
27+
28+
providers:
29+
memory:
30+
users:
31+
foo: { password: foo, roles: ROLE_USER }
32+
bar: { password: bar, roles: [ROLE_USER, ROLE_ADMIN] }
33+
entity:
34+
entity: { class: SecurityBundle:User, property: username }
35+
36+
firewalls:
37+
somename:
38+
pattern: .*
39+
request_matcher: some.service.id
40+
access_denied_url: /foo/error403
41+
access_denied_handler: some.service.id
42+
entry_point: some.service.id
43+
provider: name
44+
context: name
45+
x509:
46+
provider: name
47+
http_basic:
48+
provider: name
49+
http_digest:
50+
provider: name
51+
form_login:
52+
check_path: /login_check
53+
login_path: /login
54+
use_forward: true
55+
always_use_default_target_path: false
56+
default_target_path: /
57+
target_path_parameter: _target_path
58+
use_referer: false
59+
failure_path: /foo
60+
failure_forward: false
61+
failure_handler: some.service.id
62+
success_handler: some.service.id
63+
username_parameter: _username
64+
password_parameter: _password
65+
post_only: true
66+
remember_me: false
67+
remember_me:
68+
token_provider: name
69+
key: someS3cretKey
70+
name: NameOfTheCookie
71+
lifetime: 3600 # in seconds
72+
path: /foo
73+
domain: somedomain.foo
74+
secure: true
75+
httponly: true
76+
always_remember_me: false
77+
remember_me_parameter: _remember_me
78+
logout:
79+
invalidate_session: false
80+
cookies: [a, b, c]
81+
anonymous: ~
82+
83+
access_control:
84+
-
85+
path: /foo
86+
host: mydomain.foo
87+
ip: 192.0.0.0/8
88+
attributes:
89+
_controller: SomeController
90+
roles: [ROLE_A, ROLE_B]
91+
requires_channel: https
92+
93+
role_hierarchy:
94+
ROLE_SUPERADMIN: [ROLE_ADMIN, ROLE_USER]
95+
ROLE_FOO: [ROLE_USER]
96+
97+

guides/security/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ Security
1010
authorization
1111
acl
1212
acl_advanced
13+
config_reference

quick_tour/the_big_picture.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ So, Symfony2 routes the request by reading the routing configuration file:
124124
defaults: { _controller: FrameworkBundle:Default:index }
125125
126126
hello:
127-
resource: @HelloBundle/Resources/config/routing.yml
127+
resource: "@HelloBundle/Resources/config/routing.yml"
128128
129129
.. code-block:: xml
130130

0 commit comments

Comments
 (0)