12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- # To get started with security, check out the documentation:
- # http://symfony.com/doc/current/book/security.html
- security:
- encoders:
- FOS\UserBundle\Model\UserInterface:
- id: Chamilo\UserBundle\Security\Encoder
- # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
- providers:
- fos_userbundle:
- id: fos_user.user_provider.username
- access_control:
- - {path: ^/administrator, role: ROLE_ADMIN}
- - {path: ^/efconnect, role: ROLE_USER}
- - {path: ^/elfinder, role: ROLE_USER}
- - {path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY}
- role_hierarchy:
- ROLE_SONATA_ADMIN: ROLE_USER
- ROLE_ADMIN:
- - ROLE_SUPER_ADMIN
- - ROLE_SONATA_ADMIN
- - ROLE_QUESTION_MANAGER
- - ROLE_SESSION_MANAGER
- - ROLE_TEACHER
- - ROLE_DIRECTOR
- - ROLE_JURY_PRESIDENT
- - ROLE_CURRENT_COURSE_TEACHER
- - SONATA
- ROLE_SUPER_ADMIN: [ROLE_SONATA_ADMIN, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
- ROLE_GLOBAL_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
- ROLE_RRHH: [ROLE_TEACHER]
- ROLE_TEACHER: [ROLE_STUDENT]
- ROLE_QUESTION_MANAGER: [ROLE_STUDENT, ROLE_QUESTION_MANAGER]
- ROLE_SESSION_MANAGER: [ROLE_STUDENT, ROLE_SESSION_MANAGER, ROLE_ALLOWED_TO_SWITCH]
- ROLE_STUDENT: [ROLE_STUDENT]
- ROLE_CURRENT_TEACHER: []
- ROLE_CURRENT_COURSE_STUDENT: [ROLE_CURRENT_COURSE_STUDENT] # Set in the course listener
- ROLE_CURRENT_COURSE_TEACHER: [ROLE_CURRENT_COURSE_TEACHER, ROLE_CURRENT_COURSE_STUDENT] # Set in the course listener
- ROLE_CURRENT_SESSION_COURSE_STUDENT: [ROLE_CURRENT_SESSION_COURSE_STUDENT]
- ROLE_CURRENT_SESSION_COURSE_TEACHER: [ROLE_CURRENT_SESSION_COURSE_STUDENT, ROLE_CURRENT_SESSION_COURSE_TEACHER]
- SONATA:
- - ROLE_SONATA_PAGE_ADMIN_PAGE_EDIT # if you are not using acl then this line must be uncommented
- - ROLE_SONATA_PAGE_ADMIN_BLOCK_EDIT
- ROLE_ANONYMOUS: [ROLE_ANONYMOUS]
- #access_decision_manager:
- # strategy can be: affirmative, unanimous or consensus
- # only grant access if none of the voters has denied access
- #strategy: unanimous
- firewalls:
- # disables authentication for assets and the profiler, adapt it according to your needs
- dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
- anonymous: true
- admin:
- pattern: ^/
- context: admin
- anonymous: true
- form_login:
- provider: fos_userbundle
- csrf_token_generator: security.csrf.token_manager
- login_path: /login
- use_forward: false
- check_path: /login
- # success_handler: chamilo_core.listener.login_success_handler
- failure_path: null
- guard:
- authenticators:
- - chamilo_user.security.login_form_authenticator
- remember_me:
- secret: '%secret%'
- lifetime: 604800 # 1 week in seconds
- path: /
- logout:
- path: /logout
- target: /
- switch_user: false
- oauth:
- resource_owners:
- facebook: "/login/check-facebook"
- google: "/login/check-google"
- github: "/login/check-github"
- login_path: /login
- failure_path: /login
- use_forward: false
- oauth_user_provider:
- service: chamilo_user.security.user_provider
|