Magento: How to Override Mage_Core_Controller_Front_Action

前端 未结 1 1840
故里飘歌
故里飘歌 2021-01-07 00:20

I\'d like to override Mage_Core_Controller_Front_Action to add ACL checks to all front-end controller actions, similar to the way it\'s done in Mage_Admin

相关标签:
1条回答
  • 2021-01-07 00:44

    Instead of overriding Mage_Core_Controller_Front_Action (which is almost impossible without, as you mentioned, overriding each front controller that is based on this class), you can put an observer on the controller_action_predispatch event, and use the controller_action value that is sent with it (and which should actually be on front-end the current instance of Mage_Core_Controller_Front_Action).

    0 讨论(0)
提交回复
热议问题