Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2017
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. # To get started with security, check out the documentation:
  2. # http://symfony.com/doc/current/book/security.html
  3. security:
  4.  
  5. encoders:
  6. AppBundle\Entity\AdminSystemUser: bcrypt
  7. DailyInfoLegacyBundle\Entity\User: bcrypt
  8.  
  9.  
  10. role_hierarchy:
  11. ROLE_USER:
  12. ROLE_STAFF: [ROLE_ADMIN]
  13. ROLE_STAFF_MGMT: [ROLE_STAFF]
  14.  
  15. # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
  16. providers:
  17. public_users:
  18. entity: { class: LegacyBundle\Entity\User, property: username }
  19. admin_system_users:
  20. entity: { class: AppBundle\Entity\AdminSystemUser, property: username }
  21. fos_userbundle:
  22. id: fos_user.user_provider.username
  23.  
  24. firewalls:
  25. # disables authentication for assets and the profiler, adapt it according to your needs
  26. dev:
  27. pattern: ^/(_(profiler|wdt)|css|images|js)/
  28. security: false
  29.  
  30. admin_system:
  31. pattern: ^/admin
  32. anonymous: ~
  33. logout:
  34. path: /admin/logout
  35. target: /admin/login
  36. invalidate_session: false
  37. remember_me:
  38. secret: '%secret%'
  39. remember_me_parameter: '_admin_remember_me'
  40. lifetime: 3600
  41. guard:
  42. entry_point: app.security.admin_login_form_authenticator
  43. authenticators:
  44. - app.security.admin_login_form_authenticator
  45. public_users:
  46. anonymous: ~
  47. logout:
  48. path: /logout
  49. invalidate_session: false
  50. # remember_me:
  51. # secret: '%secret%'
  52. # remember_me_parameter: '_remember_me'
  53. # lifetime: 3600
  54. guard:
  55. entry_point: app.security.login_form_authenticator
  56. authenticators:
  57. - app.security.public_user_impersonation_authenticator
  58. - app.security.login_form_authenticator
  59. - app.facebook_authenticator
  60.  
  61. access_control:
  62. admin_login:
  63. path: /admin/login
  64. roles: IS_AUTHENTICATED_ANONYMOUSLY
  65. requires_channel: https
  66. admin_area:
  67. path: ^/admin
  68. roles: ROLE_STAFF
  69. requires_channel: https
  70. members_login:
  71. path: /login
  72. roles: IS_AUTHENTICATED_ANONYMOUSLY
  73. requires_channel: https
  74. members_register:
  75. path: /users/register
  76. roles: IS_AUTHENTICATED_ANONYMOUSLY
  77. requires_channel: https
  78. members_area:
  79. path: /users
  80. roles: ROLE_USER
  81. requires_channel: https
  82. all:
  83. path: ^/
  84. roles: IS_AUTHENTICATED_ANONYMOUSLY
  85. requires_channel: https
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement