2013-09-22 18 views
0

我最近在配置JMSSecurityExtraBundle,當我嘗試將表達式添加到我的防火牆規則,它拋出我這個錯誤:JMSSecuritybundle投擲「security.expressions.expression」的定義來定義「security.expressions.expression

Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\RuntimeException' with message 'The parent definition "security.expressions.expression" defined for definition "security.expressions.expression.3b9a3b9db79b52922a36b870bc46e5b114425575" does not exist.'

我跟着準確的描述,因爲這頁上介紹:

http://jmsyst.com/bundles/JMSSecurityExtraBundle/master/installation

這時候發生的錯誤:

security: 
    access_control: 
     - { path: ^/foo, access: "hasRole('FOO') and hasRole('BAR')" } 
+0

HMH,實在無法找到一個解決這個 –

回答

0

您必須激活表達式才能正常工作。 添加

jms_security_extra: 
    expressions: true 

您config.yml和嘗試

相關問題