If you are facing a problem like in magento admin you can’t save acl information for api / admin user, here is the solution :-
For Api User overwrite the constructor of the block Mage_Adminhtml_Block_Api_Tab_Rolesedit with following function :-
public function __construct() {
Mage_Adminhtml_Block_Widget_Form :: __construct();
//parent::__construct();
$rid = Mage::app()->getRequest()->getParam('rid', false);
$resources = Mage::getModel('api/roles')->getResourcesList();
$rules_set = Mage::getResourceModel('api/rules_collection')->getByRoles($rid)->load();
$selrids = array();
foreach ($rules_set->getItems() as $item) {
//changed the code here..
if (array_key_exists($item->getResource_id(), $resources) && $item->getPermission() == 'allow') {
$resources[$item->getResource_id()]['checked'] = true;
array_push($selrids, $item->getResource_id());
}
}
$this->setSelectedResources($selrids);
$this->setTemplate('api/rolesedit.phtml');
}
