security:
    encoders:
        Symfony\Component\Security\Core\User\User: plaintext
        FOS\UserBundle\Model\UserInterface: bcrypt

    role_hierarchy:

        ROLE_ADMIN:   ROLE_CREATEUR       
        ROLE_SUPER_ADMIN: [ROLE_ADMIN]

    providers:
        in_memory:
            memory: ~
        fos_userbundle:
            id: fos_user.user_provider.username

    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false   
        main:
            pattern: ^/
            form_login:
                provider: fos_userbundle
                csrf_token_generator: security.csrf.token_manager
                login_path: fos_user_security_login
                check_path: fos_user_security_check
                default_target_path: administration
                
            logout:
                path :   fos_user_security_logout
                target : fos_user_security_login
            remember_me:
                secret: '%secret%'
                lifetime: 18000 # in seconds
                path: fos_user_security_login
                always_remember_me: true
                remember_me_parameter: _remember_me
            anonymous:    true

    access_control:
            - { path: /parametrage/inscription, role: IS_AUTHENTICATED_ANONYMOUSLY }
            - { path: /parametrage/searchNomCommercial, role: IS_AUTHENTICATED_ANONYMOUSLY }
            - { path: /parametrage/chargerPrefecture, role: IS_AUTHENTICATED_ANONYMOUSLY }
            - { path: /parametrage/chargerSousPrefecture, role: IS_AUTHENTICATED_ANONYMOUSLY }
            - { path: /parametrage/archivenomcommerciaux/nom-commerciaux, role: IS_AUTHENTICATED_ANONYMOUSLY }
            - { path: /parametrage/archivenomcommerciaux/archive-nom-commerciaux, role: ROLE_SUPER_ADMIN }            
            - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
            - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
            - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
            - { path: /parametrage/traiterDossier/, role: [ROLE_ADMIN,ROLE_POLE,ROLE_CREATEUR] }
            - { path: /parametrage/traiterPersMorale/, role: [ROLE_ADMIN,ROLE_POLE,ROLE_CREATEUR] }
            - { path: /parametrage/traiterPersPhysique/, role: [ROLE_ADMIN,ROLE_POLE,ROLE_CREATEUR] }
            - { path: /admin/brouillon, role: ROLE_CREATEUR }
            - { path: /admin/addActiviteAnterieure, role: ROLE_CREATEUR }
            - { path: /admin/suivreDossier, role: ROLE_CREATEUR }
            - { path: /parametrage/chargerPrefecture, role: ROLE_CREATEUR }  
            - { path: /parametrage/chargerSousPrefecture, role: ROLE_CREATEUR }  
            - { path: /parametrage/chargerActivite, role: ROLE_CREATEUR }
            - { path: /parametrage/chargerCategorieLicence, role: ROLE_CREATEUR }  
            - { path: /admin/creerDossier, role: ROLE_CREATEUR }  
            - { path: /utilisateurs/utilisateurs/profil, role: ROLE_USER }
            - { path: /utilisateurs/utilisateurs/, role: [ROLE_ADMIN, ROLE_POLE] }
            - { path: /traduction/, role: ROLE_SUPER_ADMIN }
            - { path: /parametrage/, role: [ROLE_SUPER_ADMIN,ROLE_POLE] }
            - { path: /admin/admin/liensutiles, role: ROLE_SUPER_ADMIN }
            - { path: /admin/admin/documentation, role: ROLE_SUPER_ADMIN }
            - { path: /admin/dossierpole, role: [ROLE_SUPER_ADMIN, ROLE_POLE] }
            - { path: /admin/dossiersGreffe, role: [ROLE_SUPER_ADMIN, ROLE_CREATEUR] }            
            - { path: /utilisateurs/entreprise, role: ROLE_USER }
            - { path: /admin, role: ROLE_USER }
            - { path: /traduction, role: ROLE_USER }
            - { path: /statistiques-periode, role: [ROLE_ADMIN, ROLE_POLE] }
            - { path: /statistiques-repartition, role: [ROLE_ADMIN, ROLE_POLE] }
            - { path: /statistiques-annuelles, role: [ROLE_ADMIN, ROLE_POLE] }
            
           
           