Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit 64c4d00

Browse files
committed
updated to FrameworkExtraBundle 3.0 (examples updated as well)
1 parent 960f374 commit 64c4d00

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

app/config/security.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,4 @@ security:
3535
# realm: "Secured Demo Area"
3636

3737
access_control:
38-
- { path: ^/demo/secured/hello/admin/, roles: ROLE_ADMIN }
3938
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"symfony/swiftmailer-bundle": "~2.3",
1717
"symfony/monolog-bundle": "~2.4",
1818
"sensio/distribution-bundle": "~2.3",
19-
"sensio/framework-extra-bundle": "~2.3",
19+
"sensio/framework-extra-bundle": "~3.0@dev",
2020
"sensio/generator-bundle": "~2.3",
2121
"incenteev/composer-parameter-handler": "~2.0"
2222
},

src/Acme/DemoBundle/Controller/SecuredController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
88
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
99
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
10+
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
1011

1112
/**
1213
* @Route("/demo/secured")
@@ -59,6 +60,7 @@ public function helloAction($name)
5960

6061
/**
6162
* @Route("/hello/admin/{name}", name="_demo_secured_hello_admin")
63+
* @Security("is_granted('ROLE_ADMIN')")
6264
* @Template()
6365
*/
6466
public function helloadminAction($name)

0 commit comments

Comments
 (0)