# To get started with security, check out the documentation:
# http://symfony.com/doc/current/book/security.html
security:
    encoders:
        AppBundle\Entity\User:
            algorithm: bcrypt

    # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
    providers:
        user_provider:
            entity:
                class: AppBundle:User

    role_hierarchy:
        ROLE_MANAGER: ROLE_OPERATOR
        ROLE_ADMIN:   ROLE_MANAGER

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

        main:
            anonymous: ~
            form_login: ~
            logout: ~

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

# To get started with security, check out the documentation:
# http://symfony.com/doc/current/book/security.html
security:
    encoders:
        AppBundle\Entity\User:
            algorithm: bcrypt

    # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
    providers:
        user_provider:
            entity:
                class: AppBundle:User

    role_hierarchy:
        ROLE_MANAGER: ROLE_OPERATOR
        ROLE_ADMIN:   ROLE_MANAGER

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

        main:
            anonymous: ~
            form_login: ~
            logout: ~

    access_control:
        - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/sign_up, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin, roles: ROLE_ADMIN }
        - { path: ^/activity, allow_if: %kernel.debug% }
        - { path: ^/, roles: ROLE_OPERATOR }

Access to activity route only in debug mode
Access to activity route only in debug mode
