Security 用于DemoController的symfony2安全防火墙

Security 用于DemoController的symfony2安全防火墙,security,symfony,Security,Symfony,我已经创建了一个标准symfony edition项目-2.3.8,带有标准演示和安全控制器 是否可以以某种方式配置安全设置,即在SecuredController中经过身份验证的用户也可以在DemoController中看到 对于未经身份验证的用户,DemoController也应可见 当我将pattern设置为: secured_area: pattern: ^/demo/ 未经身份验证的用户看不到演示,设置不同: secured_ar

我已经创建了一个标准symfony edition项目-2.3.8,带有标准演示和安全控制器

是否可以以某种方式配置安全设置,即在SecuredController中经过身份验证的用户也可以在DemoController中看到

对于未经身份验证的用户,DemoController也应可见

当我将pattern设置为:

        secured_area:
        pattern:    ^/demo/
未经身份验证的用户看不到演示,设置不同:

        secured_area:
        pattern:    ^/demo/secured
在SecuredCOntroller中经过身份验证的用户在DemoController中不可见


谢谢

在安全防火墙设置上方为您的非安全区域添加另一个防火墙:

      non_secured:
            pattern: ^api/public
            anonymous: true