Skip to content
Browse files

updated to FrameworkExtraBundle 3.0 (examples updated as well)

  • Loading branch information...
1 parent 960f374 commit 64c4d00537a7a07f686fbaaa989f092e2c3ef24f @fabpot fabpot committed Nov 25, 2013
Showing with 3 additions and 2 deletions.
  1. +0 −1 app/config/security.yml
  2. +1 −1 composer.json
  3. +2 −0 src/Acme/DemoBundle/Controller/SecuredController.php
View
1 app/config/security.yml
@@ -35,5 +35,4 @@ security:
# realm: "Secured Demo Area"
access_control:
- - { path: ^/demo/secured/hello/admin/, roles: ROLE_ADMIN }
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
View
2 composer.json
@@ -16,7 +16,7 @@
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
- "sensio/framework-extra-bundle": "~2.3",
+ "sensio/framework-extra-bundle": "~3.0@dev",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0"
},
View
2 src/Acme/DemoBundle/Controller/SecuredController.php
@@ -7,6 +7,7 @@
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
/**
* @Route("/demo/secured")
@@ -59,6 +60,7 @@ public function helloAction($name)
/**
* @Route("/hello/admin/{name}", name="_demo_secured_hello_admin")
+ * @Security("is_granted('ROLE_ADMIN')")
* @Template()
*/
public function helloadminAction($name)

0 comments on commit 64c4d00

Please sign in to comment.
Something went wrong with that request. Please try again.