security:
    encoders:
        FOS\UserBundle\Model\UserInterface: bcrypt
    
    role_hierarchy:
        ROLE_ADMIN:        ROLE_USER
        ROLE_SUPER_ADMIN:  ROLE_ADMIN
            
    providers:
        fos_userbundle:
            id: fos_user.user_provider.username_email

    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt|error)|css|images|js)/
            security: false

        main:
            pattern: ^/
            form_login:
                always_use_default_target_path: true
                default_target_path: AppBundle_index               
                provider: fos_userbundle
                csrf_provider: security.csrf.token_manager
            logout:       true
            anonymous:    true

    access_control:
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/importar/*, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/telefonia/*, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/pentaho/*, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/, role: ROLE_ADMIN }
        - { path: ^/*, roles: ROLE_USER }
        