0

magento Core 事件中是否有 adminhtml_permissions_user_save_before 事件?

我创建了一个观察者来观察 ADMIN USER before_save 事件因为我想根据角色类型执行特定操作并且我不想编辑核心模块。

编辑:

<config>
<modules>
    <Eco_Perm>
        <version>1.0.9</version>
    </Eco_Perm>
</modules>
<global>
    <models>
        <perm>
            <class>Eco_Perm_Model</class>
            <resourceModel>perms</resourceModel>
        </perm>
        <perms>
            <class>Eco_Perm_Model_Mysql4</class>
            <entities>
                <perm>
                    <table>perm/observer</table>
                </perm>
            </entities>
        </perms>
    </models>
    <resources>
        <perm>
            <setup>
                <module>Eco_Perm</module>
                <class>Eco_Perm_Model_Resource_Setup</class>
            </setup>
        </perm>
    </resources>
    <events>
        <catalog_product_save_before>
            <observers>
                <Eco_Perm_Model_Observer>
                    <type>singleton</type>
                    <class>perm/observer</class>
                    <method>testProductedit</method>
                </Eco_Perm_Model_Observer>
            </observers>
        </catalog_product_save_before>

        <adminhtml_permissions_user_save_before>
            <observer>
                <Eco_Perm_Model_Observer>
                    <type>singleton</type>
                    <class>perm/observer</class>
                    <method>updatepermer</method>
                </Eco_Perm_Model_Observer>
            </observer>
        </adminhtml_permissions_user_save_before>

    </events>
</global>
<admin>
    <routers>
        <perm>
            <use>admin</use>
            <args>
                <module>Eco_Perm</module>
                <frontName>perm</frontName>
            </args>
        </perm>
    </routers>
</admin>
<adminhtml>
    <layout>
        <updates>
            <perm>
                <file>perm.xml</file>
            </perm>
        </updates>
    </layout>
    <menu>
        <perm translate="title" module="adminhtml">
            <title>Affiliate</title>
            <sort_order>100</sort_order>
            <children>
                <set_time>
                    <title>Shipper's</title>
                    <action>perm/adminhtml_index</action>
                </set_time>
            </children>
        </perm>
    </menu>
</adminhtml>

4

1 回答 1

0

我认为您正在寻找的事件是controller_action_predispatch_adminhtml_permissions_user_save

查看这篇文章。它将帮助您追踪您想要的事件。

于 2013-02-27T09:48:38.610 回答