Improved: Request Roles - VIEW permissions (OFBIZ-12495) (#448)

Currently, a user with only 'VIEW' permissions, as demonstrated in trunk demo with userId = auditor, accessing the Request Roles screen, sees editable fields and/or triggers (to requests) reserved for users with 'CREATE' or 'UPDATE' permissions.
https://localhost:8443/ordermgr/control/requestroles?custRequestId=9000

Modified: CustRequestScreens.xml
- screen RequestRoles, restructured to work with permissions.
This commit is contained in:
Pierre Smits
2022-01-20 13:25:36 +01:00
committed by GitHub
parent 935dbbbb78
commit f3775bde2d
@@ -238,10 +238,29 @@ under the License.
<widgets>
<decorator-screen name="CommonRequestDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="EditRequestRolePanel" title="${uiLabelMap.PageTitleEditRequestRoles}" collapsible="true">
<include-form name="EditRequestRole" location="component://order/widget/ordermgr/CustRequestForms.xml"/>
</screenlet>
<include-form name="ListRequestRoles" location="component://order/widget/ordermgr/CustRequestForms.xml"/>
<section>
<condition>
<and>
<or>
<if-has-permission permission="ORDERMGR" action="_CREATE"/>
<if-has-permission permission="ORDERMGR" action="_UPDATE"/>
</or>
</and>
</condition>
<widgets>
<screenlet id="EditRequestRolePanel" title="${uiLabelMap.PageTitleEditRequestRoles}" collapsible="true">
<include-form name="EditRequestRole" location="component://order/widget/ordermgr/CustRequestForms.xml"/>
</screenlet>
<screenlet id="RequestRoles">
<include-form name="ListRequestRoles" location="component://order/widget/ordermgr/CustRequestForms.xml"/>
</screenlet>
</widgets>
<fail-widgets>
<screenlet id="RequestRoles">
<include-form name="ViewRequestRoles" location="component://order/widget/ordermgr/CustRequestForms.xml"/>
</screenlet>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>