security:
    # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers

    role_hierarchy:
        ROLE_SUPER_ADMIN: ROLE_ADMIN
        ROLE_ADMIN: [ ROLE_HR_ADMIN, ROLE_DASHBOARD_VIEWER, ROLE_DATA_CAPTURER, ROLE_REPORT_VIEWER, ROLE_EMPLOYEE, ROLE_USER ]
        ROLE_DATA_CAPTURER: ROLE_USER
        ROLE_HR_ADMIN: [ROLE_USER, ROLE_DASHBOARD_VIEWER, ROLE_REPORT_VIEWER]
        ROLE_EMPLOYEE: ROLE_USER
        ROLE_DASHBOARD_VIEWER: ROLE_USER
        ROLE_REPORT_VIEWER: ROLE_USER

    providers:
        app_user_provider:
            entity:
                class: App\Entity\User #Your main user entity name
                property: email
    encoders:
        App\Entity\User:
            algorithm: 'auto'
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            anonymous: lazy
            form_login:
                login_path: login_route #Route where your login page is
                check_path: login_route
                csrf_token_generator: security.csrf.token_manager
                provider: app_user_provider
            logout:
                path: user_logout_route
                target: login_route
                invalidate_session: true
            guard:
                authenticators:
                    - App\Security\LoginFormAuthenticator
    access_control:
    - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/logout, roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/register, roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/forgot-password, roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/(css|js), roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/(_wdt|_profiler), roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/admin, roles: ROLE_ADMIN }
    - { path: ^/company/admin, roles: ROLE_ADMIN }
    - { path: ^/survey-questionnaire, roles: ROLE_EMPLOYEE }
    - { path: ^/company, roles: ROLE_HR_ADMIN }
    - { path: ^/, roles: [ROLE_USER, IS_AUTHENTICATED_ANONYMOUSLY] }
