Granting API custom/full access role in Magento 1.6.2 (Web Services > Roles) simply doesn't work.
How to we fix it?
Copy app/code/core/Mage/AdminHtml/Block/Api/Tab/RolesEdit.php
To: app/code/local/Mage/AdminHtml/Block/Api/Tab/RolesEdit.php
Inside, place the following:
class Mage_Adminhtml_Block_Api_Tab_Rolesedit extends Mage_Adminhtml_Block_Widget_Form { public function __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) { if (array_key_exists(strtolower($item->getResource_id()), $resources) && $item->getApiPermission() == 'allow') { $resources[$item->getResource_id()]['checked'] = true; array_push($selrids, $item->getResource_id()); } } $this->setSelectedResources($selrids); $this->setTemplate('api/rolesedit.phtml'); } }