Magento doesn’t save API role permission

If you met the problem of something like you can’t save the API roles permission, please follow below instruction, it’s actually a bug since Magento CE v1.6.x (it apparently exists in Magento Enterprise Edition as well).

Below is the code edit. Inside app/code/core/Mage/AdminHtml/Block/Api/Tab/RolesEdit.php we will look inside the constructor for a function call to getPermission.

Look for below code:

if (array_key_exists(strtolower($item->getResource_id()), $resources) && $item->getPermission() == 'allow')

and change the getPermission() to getApiPermission()

This should solve your problem.

Leave a Reply

Your email address will not be published. Required fields are marked *