Guest User

Untitled

a guest
Oct 24th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. security:
  2. encoders:
  3. Symfony\Component\Security\Core\User\User: plaintext
  4.  
  5. role_hierarchy:
  6. ROLE_ADMIN: ROLE_USER
  7. ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  8.  
  9. providers:
  10. in_memory:
  11. users:
  12. user: { password: userpass, roles: [ 'ROLE_USER' ] }
  13. admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
  14.  
  15. fos_userbundle:
  16. id: fos_user.user_manager
  17.  
  18.  
  19.  
  20. firewalls:
  21. main:
  22. form_login:
  23. provider: fos_userbundle
  24. profiler:
  25. pattern: ^/_profiler
  26. security: false
  27.  
  28. wdt:
  29. pattern: ^/_wdt
  30. security: false
  31.  
  32. main:
  33. pattern: .*
  34. form_login:
  35. provider: fos_userbundle
  36. login_path: /login
  37. use_forward: false
  38. check_path: /login_check
  39. failure_path: null
  40. logout: true
  41. anonymous: true
  42.  
  43. access_control:
  44. # The WDT has to be allowed to anonymous users to avoid requiring the login with the AJAX request
  45. - { path: ^/_wdt/, role: IS_AUTHENTICATED_ANONYMOUSLY }
  46. - { path: ^/_profiler/, role: IS_AUTHENTICATED_ANONYMOUSLY }
  47. # AsseticBundle paths used when using the controller for assets
  48. - { path: ^/js/, role: IS_AUTHENTICATED_ANONYMOUSLY }
  49. - { path: ^/css/, role: IS_AUTHENTICATED_ANONYMOUSLY }
  50. # URL of FOSUserBundle which need to be available to anonymous users
  51. - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
  52. - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
  53. - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
  54. # Secured part of the site
  55. # This config requires being logged for the whole site and having the admin role for the admin part.
  56. # Change these rules to adapt them to your needs
  57. - { path: ^/admin/, role: ROLE_ADMIN }
  58. - { path: ^/.*, role: ROLE_USER }
  59.  
  60. role_hierarchy:
  61. ROLE_ADMIN: ROLE_USER
  62. ROLE_SUPER_ADMIN: ROLE_ADMIN
Add Comment
Please, Sign In to add comment