Skip to content

Instantly share code, notes, and snippets.

@weaverryan weaverryan/security.yml Secret
Created Jun 18, 2016

Embed
What would you like to do?
Original security.yml from the Symfony2 security course
security:
encoders:
Symfony\Component\Security\Core\User\User: plaintext
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
providers:
in_memory:
memory:
users:
user: { password: userpass, roles: [ 'ROLE_USER' ] }
admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
firewalls:
secured_area:
pattern: ^/
form_login:
check_path: login_check
login_path: login_form
logout:
path: _demo_logout
target: _demo
anonymous: ~
#http_basic:
# realm: "Secured Demo Area"
access_control:
- { path: ^/new, roles: ROLE_USER }
- { path: ^/create, roles: ROLE_USER }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.