在自定义模块和ACL中扩展Magento REST API允许

在自定义模块和ACL中扩展Magento REST API允许,api,magento,rest,magento-1.8,Api,Magento,Rest,Magento 1.8,我使用以下链接创建了带有RESTAPI的模块 当我运行以下URL/api/rest/magepim/products/count时,我得到403错误 对magento核心代码的深入研究表明了这个问题 \app\code\core\Mage\Api2\Model\Server.php 字符串216 if (!$globalAcl->isAllowed($apiUser, $request->getResourceType(), $request->getOperation

我使用以下链接创建了带有RESTAPI的模块

当我运行以下URL/api/rest/magepim/products/count时,我得到403错误

对magento核心代码的深入研究表明了这个问题

\app\code\core\Mage\Api2\Model\Server.php
字符串216

   if (!$globalAcl->isAllowed($apiUser, $request->getResourceType(), $request->getOperation())) 
示例中有什么问题?我猜原因是xml文件中缺少或不正确的acl,但在哪里呢


Magento版本是1.8

您是否按照以下说明操作

在管理中,系统->Web服务->REST角色->添加管理员角色

创建一个管理员角色,并从角色API资源列表中选择MagePim API调用

然后在“角色用户”选项卡中,通过在下拉列表中选择任意项来选择管理员用户,此时将显示用户列表。从中选择管理员用户并保存

如果有任何问题,请告诉我