OFBIZ 菜单权限 配置


1、新加的模块分配给用户权限组 需要的权限:

OFBTOOLS_VIEW 访问库存OFBiz管理程序的权限

POSMGR_ADMIN POS-管理员 (新加模块管理员权限)

 

2、分配某个模块二级菜单的权限

POSMGR_ADMIN POS-管理员 (新加模块管理员权限,肯定要加,没有这个权限,连模块都进不了)

SECURITY_ADMIN 在安全管理屏幕中的全部操作。(进入到模块下菜单的权限)

 

XXXScreen.xml 代码:

<screen name="showTransactionMgr">
        <section>
            <actions>
                <property-map resource="PosMgrUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="layoutSettings.styleSheets[+0]" value="/images/eshouefu/css/main.css" global="true"/>
                <set field="layoutSettings.styleSheets[+0]" value="/images/eshouefu/css/WdatePicker.css" global="true"/>
                <set field="posmgrTabButtonItem" value="transactionMgr"/>
            </actions>
            <widgets>
                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="pre-body">
                        <section>
                            <condition>
                                <if-service-permission service-name="securityPermissionCheck" main-action="VIEW"/>
                            </condition>
                            <widgets>
                                <include-menu name="PosMgrTabBar" location="component://posmgr/widget/PosMgrMenus.xml"/>
                            </widgets>
                        </section>
                    </decorator-section>
                    <decorator-section name="body">
                        <platform-specific>
                            <html>
                                <html-template location="component://posmgr/webapp/posmgr/pages/transactionMgr.ftl" />
                            </html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

XXXMenu.xml:

<menu name="PosMgrTabBar" default-menu-item-name="transactionQuery" default-selected-style="selected" menu-container-style="button-bar tab-bar" type="simple" selected-menuitem-context-field-name="tabButtonItem">
        <menu-item name="transactionQuery" title="${uiLabelMap.TransactionQuery}">
            <condition>
                <if-has-permission permission="POSMGR" action="_ADMIN"/> 
            </condition>
            <link target="transactionQuery"/>
        </menu-item>
        <menu-item name="statementDownload" title="${uiLabelMap.StatementDownload}">
            <condition>
                <if-has-permission permission="POSMGR" action="_ADMIN"/>
            </condition>
            <link target="statementDownload"/>
        </menu-item>
        <menu-item name="statementPrint" title="${uiLabelMap.StatementPrint}">
            <condition>
                <if-has-permission permission="POSMGR" action="_ADMIN"/>
            </condition>
            <link target="statementPrint"/>
        </menu-item>
    </menu>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM