security:
    password_hashers:
        fos_legacy:
            algorithm: sha512
            encode_as_base64: true
            iterations: 5000

        App\Entity\Usuario:
            algorithm: auto
            migrate_from:
                - fos_legacy

    providers:
        app_user_provider:
            entity:
                class: App\Entity\Usuario
                property: username
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false

        main:
            pattern: ^/
            lazy: true
            provider: app_user_provider
            form_login:
                login_path: app_login
                check_path: app_login
                enable_csrf: true
                default_target_path: rutaDefault
                always_use_default_target_path: true
                use_referer: true
            logout:
                path: app_logout
                target: rutaDefault

    access_control:
        - { path: ^/api/public/contacto, roles: PUBLIC_ACCESS }
        - { path: ^/login, roles: PUBLIC_ACCESS }
        - { path: ^/logout, roles: PUBLIC_ACCESS }
        - { path: ^/reset-password, roles: PUBLIC_ACCESS }
        - { path: ^/, roles: ROLE_USER }
    role_hierarchy:
        ROLE_SUPER_ADMIN: ROLE_ADMIN
        ROLE_ADMIN:      [ ROLE_GERENCIA, ROLE_SECRETARIO, ROLE_NEGOCIADOR, ROLE_USER ]
        ROLE_GERENCIA  : [ ROLE_SECRETARIO, ROLE_NEGOCIADOR, ROLE_CADETE, ROLE_USER ]
        ROLE_NEGOCIADOR: [ ROLE_SECRETARIO, ROLE_CADETE, ROLE_USER ]
        ROLE_SECRETARIO: [ ROLE_CADETE, ROLE_USER ]
