Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # routing
- file:
- resource: "@FileBundle/Controller/"
- type: annotation
- prefix: /
- admin:
- resource: "@AdminBundle/Controller/"
- type: annotation
- prefix: /
- blog:
- resource: "@BlogBundle/Controller/"
- type: annotation
- prefix: /
- logout:
- path: /logout
- # To get started with security, check out the documentation:
- # http://symfony.com/doc/current/security.html
- security:
- # http://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
- providers:
- in_memory:
- memory:
- users:
- admin:
- password: href
- roles: 'ROLE_ADMIN'
- encoders:
- Symfony\Component\Security\Core\User\User: plaintext
- firewalls:
- # disables authentication for assets and the profiler, adapt it according to your needs
- dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
- security: false
- main:
- anonymous: ~
- # activate different ways to authenticate
- # http://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
- http_basic: ~
- # http://symfony.com/doc/current/cookbook/security/form_login_setup.html
- #form_login: ~
- logout:
- path: /logout
- target: /
- access_control:
- # require ROLE_ADMIN for /admin*
- - { path: ^/admin, roles: ROLE_ADMIN }
- role_hierarchy:
- ROLE_ADMIN: ROLE_USER
- ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement