security:
    enable_authenticator_manager: true
    # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
    password_hashers:
        Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
    # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
    providers:
        app_user_provider:
            id: App\Security\UserProvider
        bkp_user_provider:
            entity:
                class: App\Entity\RiaEvaluacionUser
                property: username
        all_users:
            chain:
                providers: ['bkp_user_provider', 'app_user_provider']
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            pattern: ^/
            lazy: true
            custom_authenticator: App\Security\AppSSOConsejoAuthenticator
            provider: all_users
            logout:
                path: app_logout
        #         # where to redirect after logout
                target: portal_consejo

    role_hierarchy: 
        ROLE_INFORMATICA: ROLE_TOMAS_POSESION, ROLE_EXAMENES
        ROLE_EVALUACION_ADMIN: ROLE_TOMAS_POSESION, ROLE_EXAMENES
        ROLE_EVALUACION_VACANTE: ROLE_EXAMENES
        ROLE_SOPORTE: ROLE_EXAMENES

    # Easy way to control access for large sections of your site
    # Note: Only the *first* access control that matches will be used
    access_control:
        # - { path: ^/admin, roles: ROLE_ADMIN }
        - { path: ^/convocatorias/cert/inscripcion/, roles: PUBLIC_ACCESS }
        - { path: ^/notificaciones/asistencia/, roles: PUBLIC_ACCESS }
        - { path: ^/examinando/notificacionesasistencia/, roles: PUBLIC_ACCESS }
        - { path: ^/sso_connect, roles: PUBLIC_ACCESS }
        - { path: ^/portal/aspirante/, roles: PUBLIC_ACCESS }
        - { path: ^/portal/consejo/, roles: PUBLIC_ACCESS }
        - { path: ^/logout, roles: IS_AUTHENTICATED_REMEMBERED }
        - { path: ^/convocatorias/front/postulantes/main, roles: IS_AUTHENTICATED_REMEMBERED }
        - { path: ^/convocatorias/front/postulantes/, roles: ROLE_EGRESADO }
        - { path: ^/tomasDePosesion/, roles: [ ROLE_TOMAS_POSESION ] }
        - { path: ^/desistimientos/, roles: [ ROLE_TOMAS_POSESION ] }
        - { path: ^/convocatorias/convocatoria/, roles: [ ROLE_INFORMATICA, ROLE_EVALUACION_VACANTE, ROLE_EVALUACION_ADMIN, ROLE_SECRETARIA ] }
        - { path: ^/, roles: IS_AUTHENTICATED_REMEMBERED }
