Skip to content

Instantly share code, notes, and snippets.

@weaverryan
Created June 18, 2016 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weaverryan/6d80273fe7d3ae964292e7135345d789 to your computer and use it in GitHub Desktop.
Save weaverryan/6d80273fe7d3ae964292e7135345d789 to your computer and use it in GitHub Desktop.
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