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>