Magento 1.6.2 Webservice Role Not Updating – Fix

If you are on Magento 1.6.2, you’ll notice that when you create a web service user, then try to create a role with access to certain resources, the resources do not save.

Luckily, it is an easy fix.

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.

The old line of code should be
if (array_key_exists(strtolower($item->getResource_id()), $resources) && $item->getPermission() == 'allow')

The new line of code should be
if (array_key_exists(strtolower($item->getResource_id()), $resources) && $item->getApiPermission() == 'allow')

This was necessary for us to get our integration to Brightpearl working from Magento 1.6.2, though it seems this bug is fixed in 1.7 we are not comfortable upgrading to it quite yet.



Leave a Reply

Contact us today! Let's talk about how we can help grow your business.

Contact Us