security:
    role_hierarchy:
        ROLE_GANTT:        ROLE_GANTT_DATA
        ROLE_GANTT_VIEWER: ROLE_GANTT_DATA
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: ROLE_ADMIN
        
    encoders:
        App\Entity\User:
            algorithm: bcrypt
            
    providers:
        our_db_provider:
            entity:
                class: App\Entity\User
            
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            anonymous: ~
            pattern:    ^/
            user_checker: App\Tools\UserChecker
            http_basic: ~
            provider: our_db_provider

            form_login:
                login_path: connexion
                check_path: connexion
                default_target_path: /
                always_use_default_target_path: true
            logout:
                path: /deconnexion
                target: /connexion
                
            remember_me:
                secret:   '%kernel.secret%'
                lifetime: 604800 # 1 week in seconds
                path:     /accueil

    # 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: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin, roles: ROLE_ADMIN }