security.yml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # To get started with security, check out the documentation:
  2. # http://symfony.com/doc/current/book/security.html
  3. security:
  4. access_control:
  5. - { path: ^/administrator, role: ROLE_ADMIN }
  6. - { path: ^/efconnect, role: ROLE_USER }
  7. - { path: ^/elfinder, role: ROLE_USER }
  8. encoders:
  9. FOS\UserBundle\Model\UserInterface:
  10. id: chamilo_user.security.encoder
  11. role_hierarchy:
  12. ROLE_SONATA_ADMIN: ROLE_USER
  13. ROLE_ADMIN:
  14. - ROLE_SONATA_ADMIN
  15. - ROLE_QUESTION_MANAGER
  16. - ROLE_SESSION_MANAGER
  17. - ROLE_TEACHER
  18. - ROLE_DIRECTOR
  19. - ROLE_JURY_PRESIDENT
  20. - ROLE_CURRENT_COURSE_TEACHER
  21. - SONATA
  22. ROLE_SUPER_ADMIN: [ROLE_SONATA_ADMIN, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  23. ROLE_GLOBAL_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  24. ROLE_RRHH: [ROLE_TEACHER]
  25. ROLE_TEACHER: [ROLE_STUDENT]
  26. ROLE_QUESTION_MANAGER: [ROLE_STUDENT, ROLE_QUESTION_MANAGER]
  27. ROLE_SESSION_MANAGER: [ROLE_STUDENT, ROLE_SESSION_MANAGER, ROLE_ALLOWED_TO_SWITCH]
  28. ROLE_STUDENT: [ROLE_STUDENT]
  29. ROLE_CURRENT_TEACHER: []
  30. ROLE_CURRENT_COURSE_STUDENT: [ROLE_CURRENT_COURSE_STUDENT]
  31. ROLE_CURRENT_COURSE_TEACHER: [ROLE_CURRENT_COURSE_TEACHER, ROLE_CURRENT_COURSE_STUDENT]
  32. SONATA:
  33. - ROLE_SONATA_PAGE_ADMIN_PAGE_EDIT # if you are not using acl then this line must be uncommented
  34. - ROLE_SONATA_PAGE_ADMIN_BLOCK_EDIT
  35. ROLE_ANONYMOUS: [ROLE_ANONYMOUS]
  36. access_decision_manager:
  37. # strategy can be: affirmative, unanimous or consensus
  38. strategy: unanimous
  39. # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
  40. providers:
  41. fos_userbundle:
  42. id: fos_user.user_manager
  43. firewalls:
  44. # disables authentication for assets and the profiler, adapt it according to your needs
  45. dev:
  46. pattern: ^/(_(profiler|wdt)|css|images|js)/
  47. security: false
  48. main:
  49. pattern: .*
  50. context: user
  51. form_login:
  52. provider: fos_userbundle
  53. login_path: /login
  54. use_forward: false
  55. check_path: /login_check
  56. failure_path: null
  57. default_target_path: /administration
  58. # success_handler: chamilo_core.listener.login_success_handler
  59. logout:
  60. path: /logout
  61. target: /
  62. # success_handler: chamilo_core.listener.logout_success_handler
  63. invalidate_session: false
  64. # handlers: ['sonata.page.cms_manager_selector']
  65. anonymous: ~
  66. switch_user: false