hatimeria / HatimeriaExtJSBundle

ExtJS Bundle is an ExtJS (JavaScript framework) Direct Backend Implementation for Symfony2 Framework.
http://hatimeria.com
MIT License
21 stars 8 forks source link

[2.1] Service "security.extra.controller_listener" cannot be found #15

Open johnkary opened 11 years ago

johnkary commented 11 years ago

Encountered this message while trying to use in a Symfony 2.1 Standard Edition-based application.

This occurs because Symfony 2.1 SE is using JMSSecurityExtraBundle 1.2.x branch, while Symfony 2.0 SE uses JMSSecurityExtraBundle 1.0.x.

The security.extra.controller_listener service was removed in this commit: https://github.com/schmittjoh/JMSSecurityExtraBundle/commit/0ebcaf37b2fc60adeea3ddad93649a938f121c63#L13L55

He references to read the Upgrade document here: https://github.com/schmittjoh/JMSSecurityExtraBundle/blob/0ebcaf37b2fc60adeea3ddad93649a938f121c63/UPGRADE_TO_1_1

The original class itself is here: https://github.com/schmittjoh/JMSSecurityExtraBundle/blob/1.0.x/Controller/ControllerListener.php

HatimeriaExtJSBundle uses this service in the Router class here: https://github.com/hatimeria/HatimeriaExtJSBundle/blob/master/Router/Router.php#L97

And the original commit for use in HatimeriaExtJSBundle is 7585aca9376b35bb2ac582886089f4bafd8b2460.

1) What was the original purpose of this code in HatimeriaExtJSBundle? 2) The UPGRADE_TO_1_1 document seems to communicate this feature is now part of JMSDiExtraBundle. I'm not familiar enough with the old functionality to evaluate this claim.

johnkary commented 11 years ago

@wujashek Can you elaborate on how security.extra.controller_listener is used by HatimeriaExtJSBundle? What purpose does it serve, what functionality does it enable? I want to make sure we preserve this for the 2.1-compatible version we're working on.

wujashek commented 11 years ago

This was added by me to forked dispatch code (as this bundle started as a fork) to implement security call for every controller call in direct requests. So what it does it checks security permissions for every controller action call instead of calling it directly. Please see this commit https://github.com/hatimeria/HatimeriaExtJSBundle/commit/7585aca9376b35bb2ac582886089f4bafd8b2460.