How do I use the Zend ACL to allow access to certain users to some of the actions within a controller? Right now, I only know how to allow a user to access the whole controller, but I want to limit the actions within the controller! How to allow/deny the permission of user in indexcontroller. Please help ?
You would just add the actions as resources and deny/allow them to the roles. If you can post your current logic, we can probably show you how.
I created a custom plugin and placed it in myzend/library/My/Controller/Plugin/Acl.php where myzend is directory of my project.I am trying to initialize this custom plugin from application.ini using autoloaderNamespaces[] = "My_" resources.frontController.plugins.acl = "My_Controller_Plugin_Acl" and place this code in bootstrap protectedfunction _initAcl(){ $frontController =Zend_Controller_Front::getInstance(); $frontController->registerPlugin(newMy_Controller_Plugin_Acl());} I am getting error message Fatal error: Class 'My_Controller_Plugin_Acl' not found in E:\wamp\www\myZend\library\Zend\Application\Resource\Frontcontroller.php on line 117. Help me
Try changing autoloaderNamespaces to autoloadernamespaces and insure that your Acl.php class name is My_Controller_Plugin_Acl. If that doesn't work, try adding the namespace dynamically in your _initAcl: Zend_Loader_Autoloader::getInstance()->registerNamespace('My_');