我已经为管理员用户创建了一个magento自定义模块,我已准备好进行基本设置,我已经创建了一个用户角色并为该模块提供了资源访问权限,但是当我使用该用户凭据登录时,我获得了拒绝访问权限错误,但当我以管理员身份登录时,我可以访问该模块.
我的config.xml文件
原文链接:https://www.f2er.com/php/133199.html我的config.xml文件
<?xml version="1.0"?> <config> <global> <modules> <Su_VirtualRetailer> <version>0.1.0</version> </Su_VirtualRetailer> </modules> <blocks> <virtualretailer> <rewrite> <virtualretailer>Su_VirtualRetailer_Block_VirtualRetailer</virtualretailer> </rewrite> </virtualretailer> </blocks> <helpers> <su_virtualretailer> <!-- Helper definition needed by Magento --> <class>Mage_Core_Helper</class> </su_virtualretailer> </helpers> </global> <frontend> <routers> <virtualretailer> <use>standard</use> <args> <module>Su_VirtualRetailer</module> <frontName>virtualretailer</frontName> </args> </virtualretailer> </routers> <layout> <updates> <virtualretailer> <file>virtualretailer.xml</file> </virtualretailer> </updates> </layout> </frontend> <admin> <routers> <adminhtml> <args> <modules> <su_virtualretailer before="Mage_Adminhtml">Su_VirtualRetailer_Adminhtml</su_virtualretailer> </modules> </args> </adminhtml> </routers> </admin> </config>
我的adminhtml.xml
<?xml version="1.0" encoding="UTF-8"?> <config> <menu> <retailertab module="su_virtualretailer" translate="title"> <title>Virtual Retailer</title> <sort_order>100</sort_order> <children> <index module="su_virtualretailer" translate="title"> <title>Home</title> <sort_order>1</sort_order> <action>adminhtml/custom</action> </index> <myaccount module="su_virtualretailer" translate="title"> <title>My Account</title> <sort_order>2</sort_order> <action>adminhtml/custom/list</action> </myaccount> <shop module="su_virtualretailer" translate="title"> <title>Shop</title> <sort_order>3</sort_order> <action>adminhtml/custom/shop</action> </shop> </children> </retailertab> </menu> <acl> <resources> <admin> <children> <retailertab translate="title" module="su_virtualretailer"> <title>Virtual Retailer</title> <sort_order>-100</sort_order> <children> <index translate="title"> <title>Home Action</title> <sort_order>1</sort_order> </index> <myaccount translate="title"> <title>My Account Action</title> <sort_order>2</sort_order> </myaccount> <shop translate="title"> <title>Shop Action</title> <sort_order>3</sort_order> </shop> </children> </retailertab> </children> </admin> </resources> </acl> </config>