# To get started with security, check out the documentation:
# https://symfony.com/doc/current/security.html
security:
    # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
    password_hashers:
        App\Entity\User:
            id: App\Security\PasswordHash

    providers:
        app_user_provider:
            id: App\Security\UserProvider

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

        main:
            lazy: true
            provider: app_user_provider

            custom_authenticator:
                - App\Security\LoginFormAuthenticator

            logout:
                path: app_logout

    role_hierarchy:
        ROLE_WP_ADMINISTRATOR:
            - ROLE_USER
            - ROLE_ADMIN
            - ROLE_SUPER_ADMIN
        ROLE_WP_EDITOR:
            - ROLE_USER
            - ROLE_ADMIN
        ROLE_WP_SUBSCRIBER:
            - ROLE_USER
        ROLE_WP_CONTRIBUTOR:
            - ROLE_USER
        ROLE_WP_AUTHOR:
            - ROLE_USER
        ROLE_SUPER_ADMIN:
            - ROLE_USER
            - ROLE_ADMIN
            - ROLE_ALLOWED_TO_SWITCH
        ROLE_ADMIN:
            - ROLE_USER

    access_control:
        - { path: ^/admin, roles: [ROLE_ADMIN, ROLE_WP_ADMINISTRATOR] }
        - { path: ^/, roles: [PUBLIC_ACCESS] }
