File tree 4 files changed +0
-29
lines changed
4 files changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -586,7 +586,6 @@ method of the ``AppKernel`` class::
586
586
new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
587
587
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
588
588
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
589
- new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
590
589
);
591
590
592
591
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
Original file line number Diff line number Diff line change 1
1
* :doc:`SensioFrameworkExtraBundle </ bundles/SensioFrameworkExtraBundle/index> `
2
2
* :doc:`SensioGeneratorBundle </ bundles/SensioGeneratorBundle/index> `
3
- * `JMSSecurityExtraBundle`_
4
- * `JMSDiExtraBundle`_
5
3
* :doc:`DoctrineFixturesBundle </ bundles/DoctrineFixturesBundle/index> `
6
4
* :doc:`DoctrineMigrationsBundle </ bundles/DoctrineMigrationsBundle/index> `
7
5
* :doc:`DoctrineMongoDBBundle </ bundles/DoctrineMongoDBBundle/index> `
8
-
9
- .. _`JMSSecurityExtraBundle`: http://jmsyst.com/bundles/JMSSecurityExtraBundle/1.2
10
- .. _`JMSDiExtraBundle`: http://jmsyst.com/bundles/JMSDiExtraBundle/1.1
Original file line number Diff line number Diff line change @@ -105,7 +105,6 @@ a single ``Bundle`` class that describes it::
105
105
new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
106
106
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
107
107
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
108
- new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
109
108
);
110
109
111
110
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
Original file line number Diff line number Diff line change @@ -207,28 +207,6 @@ Going to the ``http://localhost/app_dev.php/demo/secured/hello``
207
207
URL will automatically redirect you to the login form because this resource is
208
208
protected by a ``firewall ``.
209
209
210
- You can also force the action to require a given role by using the ``@Secure ``
211
- annotation on the controller::
212
-
213
- use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
214
- use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
215
- use JMS\SecurityExtraBundle\Annotation\Secure;
216
-
217
- /**
218
- * @Route("/hello/admin/{name}", name="_demo_secured_hello_admin")
219
- * @Secure(roles="ROLE_ADMIN")
220
- * @Template()
221
- */
222
- public function helloAdminAction($name)
223
- {
224
- return array('name' => $name);
225
- }
226
-
227
- Now, log in as ``user `` (who does *not * have the ``ROLE_ADMIN `` role) and
228
- from the secured hello page, click on the "Hello resource secured" link.
229
- Symfony2 should return a 403 HTTP status code, indicating that the user
230
- is "forbidden" from accessing that resource.
231
-
232
210
.. note ::
233
211
234
212
The Symfony2 security layer is very flexible and comes with many different
You can’t perform that action at this time.
0 commit comments