security:
    acl:
        connection: default

    encoders:
        Genuine\UserBundle\Entity\User:
            algorithm: bcrypt
            cost: 15

    role_hierarchy:
        ROLE_STAFF:       ROLE_USER
        ROLE_ADMIN:       ROLE_STAFF
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]

    providers:
        users_provider:
            entity: { class: GenuineUserBundle:User }

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false
        login_firewall:
            pattern:   ^/login$
            anonymous: ~
        user:
            pattern:  ^/
            provider: users_provider
            remember_me:
                key:      "%secret%"
                lifetime: 31536000 # 365 days in seconds
                path:     /
                domain:   ~ # Defaults to the current domain from $_SERVER
            form_login:
                login_path: /login
                check_path: /login_check
                remember_me: true


            logout:
                path: /logout

            anonymous: false

    access_control:
        - { path: ^/admin/, roles: ROLE_ADMIN }
        - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/, roles: IS_AUTHENTICATED_FULLY }