小编att*_*akt的帖子

Symfony 6 的 access_control 问题 - is_authenticated_complete 等

    # set hierarchy for roles?
role_hierarchy: 
    # give admin also the roles inside the array.
    ROLE_ADMIN: [ROLE_USER]
# 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: ^/admin, roles: ROLE_ADMIN }
    # Unless the path is login, user must be authenticated anonymously.
    # This means only page accessible anonymously is login page.
    - { path: ^(/(login|register)),  roles: IS_AUTHENTICATED_ANONYMOUSLY }
    # can visit …
Run Code Online (Sandbox Code Playgroud)

authentication access-control symfony

5
推荐指数
1
解决办法
3987
查看次数

标签 统计

access-control ×1

authentication ×1

symfony ×1