我在Symfony 1.4.13中有一个特定的模块,默认情况下它的security.yml文件被设置为安全。我有一个特定的对象操作,我希望任何人都可以访问(注销的用户),但似乎无法找到正确的方法在YAML文件中取出操作的名称以获得匹配。允许不安全地访问security.yml中的Symfony对象操作
具体来说,我有一个project
模块,其中包含典型的索引,显示,创建等操作,以及对象操作(因此操作方法的名称为executeListRunReport
)。该security.yml文件如下:
all:
is_secure: true
index:
credentials: pm_view
show:
credentials: pm_view
filter:
credentials: pm_view
runReport: # This is the one that is giving me problems
is_secure: false
我在actions.php方法是:
public function executeListRunReport(sfWebRequest $request) {
...
}
这只是正常的去project/[idOfObject]/ListRunReport
当用户登录。
如何编写security.yml文件以允许任何人访问该操作(例如直接从我手动生成的URL中)而无需登录?谢谢!
不确定,但尝试将'all:'更改为'default:' – mblaettermann