As posted here, the ACL resource must be find in adminhtml.xml, but in extension I have there is no such. However, the acl is defined in community/3rdparty/extension/etc/config.xml file. In addition, there are


How would be the RESOURCE IDENTIFIER in such cases?

In which controller protected function _isAllowed() must be added?


The extensions are probably very outdated or at least follow deprecated coding style. Before Magento 1.4, there was no adminhtml.xml and the ACL and admin menus were configured in config.xml.

This still works for backwards compatibility

As you can see in Mage_Admin_Model_Config:

     * @deprecated after
     * support backwards compatibility with config.xml
    $aclConfig  = Mage::getConfig()->getNode('adminhtml/acl');
    if ($aclConfig) {
        $adminhtmlConfig->getNode()->extendChild($aclConfig, true);
    $menuConfig = Mage::getConfig()->getNode('adminhtml/menu');
    if ($menuConfig) {
        $adminhtmlConfig->getNode()->extendChild($menuConfig, true);

The nodes adminhtml/acl and adminhtml/menu from config.xml are merged into the adminhtml configuration. So you will find the resource identifiers in config.xml and theoretically can add them there as well. But I'd recommend creating a custom module with its own adminhtml.xml instead to add the missing resources.

As for your second question, the _isAllowed() method must be added to every controller that extends Mage_Adminhtml_Controller_Action


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.