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