Advertisement
Guest User

Untitled

a guest
May 28th, 2013
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. jms_security_extra:
  2. secure_all_services: false
  3. expressions: true
  4.  
  5. security:
  6. encoders:
  7. Symfony\Component\Security\Core\User\User: plaintext
  8. OSC\UserBundle\Entity\User: sha512
  9.  
  10. role_hierarchy:
  11. ROLE_COACH: [ROLE_USER]
  12. ROLE_EDITOR: [ROLE_USER]
  13. ROLE_PREMIUM_COACH : [ROLE_COACH]
  14. ROLE_ADMIN: [ROLE_EDITOR, ROLE_PREMIUM_COACH]
  15. ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  16.  
  17. providers:
  18. in_memory:
  19. memory:
  20. users:
  21. user: { password: userpass, roles: [ 'ROLE_USER' ] }
  22. admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
  23. fos_userbundle:
  24. id: fos_user.user_manager
  25.  
  26. firewalls:
  27. # -> end custom configuration
  28.  
  29. dashboard:
  30. pattern: /OSC/dashboard(.*)
  31. form_login:
  32. provider: fos_userbundle
  33. login_path: /login
  34. use_forward: true
  35. check_path: /login_check
  36. failure_path: null
  37. use_referer: true
  38. logout: true
  39. anonymous: false
  40.  
  41. # defaut login area for standard users
  42. # defaut login area for standard users
  43. main:
  44. pattern: .*
  45. form_login:
  46. provider: fos_userbundle
  47. csrf_provider: form.csrf_provider
  48. login_path: /login
  49. use_forward: true
  50. check_path: /login_check
  51. failure_path: null
  52. use_referer: true
  53. logout: true
  54. anonymous: true
  55.  
  56.  
  57. access_control:
  58. # URL of FOSUserBundle which need to be available to anonymous users
  59. - { path: ^/_wdt, role: IS_AUTHENTICATED_ANONYMOUSLY }
  60. - { path: ^/_profiler, role: IS_AUTHENTICATED_ANONYMOUSLY }
  61. - { path: ^/OSC/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
  62. - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
  63. - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
  64.  
  65. # Secured part of the site
  66. # This config requires being logged for the whole site and having the admin role for the admin part.
  67. # Change these rules to adapt them to your needs
  68. - { path: ^/.*, role: IS_AUTHENTICATED_ANONYMOUSLY }
  69. - { path: ^/OSC/dashboard, role: ROLE_USER}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement