Enabling new admin action(button sales_order/view) in ACL

Posted by latvian on Stack Overflow See other posts from Stack Overflow or by latvian
Published on 2010-04-10T02:28:51Z Indexed on 2010/04/10 2:33 UTC
Read the original article Hit count: 303

Filed under:

Hi,

We created new action similar to 'hold', 'ship' and others in the 'sales_order/view' admin section that can be triggered by clicking at the button. Afterward, we added our new action to the ACL with the following code in config.xml:

 <acl>  
   <resources>  
      <admin>  
          <children>  
              <sales>
                  <children>
                         <order>
                                <children>
                                    <actions translate="title">
                                        <title>Actions</title>
                                        <children>
                                            <shipNew translate="title"><title>Ship Ups</title></shipNew>
                                        </children>
                                    </actions>
                                </children>
                                <sort_order>10</sort_order>
                            </order>  
              </children>
                  </sales>  
                        </children>  
              </admin>
          </resources>  
       </acl>  

ACL functionality works, however, in the 'Resources Tree'(System/Permissions/Roles/Role Resources) our new action does never show up as selected(checked) even thou it is allowed for particular Role. I can see that from table 'admin_rule' with resource id for our new action that it is allowed, so it needs to be selected, but it is not.

When trying to solve this issue i looked into the template(permissions/rolesedit.phtml) and I found that the 'resource tree' is draw with Javascript...thats where i got stock due to my limited knowledge in Javascript.

Why the resource tree does not display our new ACL entry correctly, that is the check box is never checked?

Thank You for helping
margots

© Stack Overflow or respective owner

Related posts about magento