You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2008/08/13 23:45:11 UTC
svn commit: r685687 - in /ofbiz/trunk: applications/party/widget/partymgr/
applications/product/webapp/catalog/lookup/
applications/product/widget/catalog/ applications/product/widget/facility/
specialpurpose/assetmaint/servicedef/
Author: adrianc
Date: Wed Aug 13 14:45:11 2008
New Revision: 685687
URL: http://svn.apache.org/viewvc?rev=685687&view=rev
Log:
Converted some lookup screens hard-coded permission checking over to the permission service. Now maintenance workers can use the lookup buttons.
Modified:
ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml
ofbiz/trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml
ofbiz/trunk/applications/product/widget/catalog/LookupScreens.xml
ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml
ofbiz/trunk/specialpurpose/assetmaint/servicedef/secas.xml
Modified: ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml?rev=685687&r1=685686&r2=685687&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml Wed Aug 13 14:45:11 2008
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -23,9 +23,7 @@
<screen name="LookupPartyName">
<section>
<condition>
- <or>
- <if-has-permission permission="PARTYMGR" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
@@ -49,9 +47,7 @@
<screen name="LookupPartyEmail">
<section>
<condition>
- <or>
- <if-has-permission permission="PARTYMGR" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
@@ -75,9 +71,7 @@
<screen name="LookupCustomerName">
<section>
<condition>
- <or>
- <if-has-permission permission="PARTYMGR" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
@@ -102,9 +96,7 @@
<screen name="LookupCustomerNameForSalesRep">
<section>
<condition>
- <or>
- <if-has-permission permission="PARTYMGR" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
@@ -129,9 +121,7 @@
<screen name="LookupPerson">
<section>
<condition>
- <or>
- <if-has-permission permission="PARTYMGR" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
@@ -157,9 +147,7 @@
<screen name="LookupPartyAndUserLoginAndPerson">
<section>
<condition>
- <or>
- <if-has-permission permission="PARTYMGR" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
@@ -185,7 +173,7 @@
<screen name="LookupUserLoginAndPartyDetails">
<section>
<condition>
- <if-has-permission permission="PARTYMGR" action="_VIEW"/>
+ <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
@@ -211,9 +199,7 @@
<screen name="LookupPartyGroup">
<section>
<condition>
- <or>
- <if-has-permission permission="PARTYMGR" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
@@ -241,9 +227,7 @@
<screen name="LookupPartyClassificationGroup">
<section>
<condition>
- <or>
- <if-has-permission permission="PARTYMGR" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
Modified: ofbiz/trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml?rev=685687&r1=685686&r2=685687&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml Wed Aug 13 14:45:11 2008
@@ -45,7 +45,7 @@
<field name="submitButton" title="${uiLabelMap.CommonLookup}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="listLookupProduct" list-name="listIt" title="" type="list" paginate-target="LookupProduct"
- odd-row-style="alternate-row" default-table-style="basic-table">
+ odd-row-style="alternate-row" default-table-style="basic-table" view-size="20">
<actions>
<service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
<field-map field-name="inputFields" env-name="parameters"/>
@@ -68,7 +68,7 @@
<field name="isVirtual"><hidden value="Y"/></field>
</form>
<form name="listLookupVirtualProduct" list-name="listIt" title="" type="list" extends="listLookupProduct"
- paginate-target="LookupVirtualProduct" odd-row-style="alternate-row" default-table-style="basic-table">
+ paginate-target="LookupVirtualProduct" odd-row-style="alternate-row" default-table-style="basic-table" view-size="20">
<actions>
<service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
<field-map field-name="inputFields" env-name="parameters"/>
@@ -130,7 +130,7 @@
<field name="submitButton" title="${uiLabelMap.CommonLookup}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="listLookupProductAndPrice" list-name="listIt" title="" type="list"
- paginate-target="LookupProductAndPrice" odd-row-style="alternate-row" default-table-style="basic-table">
+ paginate-target="LookupProductAndPrice" odd-row-style="alternate-row" default-table-style="basic-table" view-size="20">
<actions>
<service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
<field-map field-name="inputFields" env-name="parameters"/>
@@ -177,7 +177,7 @@
<field name="submitButton" title="${uiLabelMap.CommonLookup}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="listLookupProductCategory" list-name="listIt" title="" type="list"
- paginate-target="LookupProductCategory" odd-row-style="alternate-row" default-table-style="basic-table">
+ paginate-target="LookupProductCategory" odd-row-style="alternate-row" default-table-style="basic-table" view-size="20">
<actions>
<service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
<field-map field-name="inputFields" env-name="parameters"/>
@@ -218,7 +218,7 @@
<field name="submitButton" title="${uiLabelMap.CommonLookup}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="listLookupProductFeature" list-name="listIt" title="" type="list" paginate-target="LookupProductFeature"
- odd-row-style="alternate-row" default-table-style="basic-table">
+ odd-row-style="alternate-row" default-table-style="basic-table" view-size="20">
<actions>
<service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
<field-map field-name="inputFields" env-name="parameters"/>
@@ -244,7 +244,7 @@
<field name="submitButton" title="${uiLabelMap.CommonLookup}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="listLookupProductStore" list-name="listIt" target="" title="" type="list"
- paginate-target="LookupProductStore" odd-row-style="alternate-row" default-table-style="basic-table">
+ paginate-target="LookupProductStore" odd-row-style="alternate-row" default-table-style="basic-table" view-size="20">
<actions>
<service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
<field-map field-name="inputFields" env-name="parameters"/>
Modified: ofbiz/trunk/applications/product/widget/catalog/LookupScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/LookupScreens.xml?rev=685687&r1=685686&r2=685687&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/LookupScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/LookupScreens.xml Wed Aug 13 14:45:11 2008
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -23,16 +23,12 @@
<screen name="LookupProduct">
<section>
<condition>
- <or>
- <if-has-permission permission="CATALOG" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupProduct}"/>
<set field="queryString" from-field="result.queryString"/>
- <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
- <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
@@ -49,16 +45,12 @@
<screen name="LookupVirtualProduct">
<section>
<condition>
- <or>
- <if-has-permission permission="CATALOG" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupProductVirtual}"/>
<set field="queryString" from-field="result.queryString"/>
- <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
- <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
@@ -75,9 +67,7 @@
<screen name="LookupVariantProduct">
<section>
<condition>
- <or>
- <if-has-permission permission="CATALOG" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
@@ -102,16 +92,12 @@
<screen name="LookupProductAndPrice">
<section>
<condition>
- <or>
- <if-has-permission permission="CATALOG" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupProductPrice}"/>
<set field="queryString" from-field="result.queryString"/>
- <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
- <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
<property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
</actions>
<widgets>
@@ -129,16 +115,12 @@
<screen name="LookupProductCategory">
<section>
<condition>
- <or>
- <if-has-permission permission="CATALOG" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupProductCategory}"/>
<set field="queryString" from-field="result.queryString"/>
- <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
- <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
@@ -155,16 +137,12 @@
<screen name="LookupProductFeature">
<section>
<condition>
- <or>
- <if-has-permission permission="CATALOG" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupProductFeature}"/>
<set field="queryString" from-field="result.queryString"/>
- <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
- <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
@@ -183,18 +161,13 @@
<screen name="LookupProductStore">
<section>
<condition>
- <or>
- <if-has-permission permission="CATALOG" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
-
<set field="title" value="${uiLabelMap.PageTitleLookupProductStore}"/>
<set field="entityName" value="ProductStore"/>
<set field="queryString" from-field="result.queryString"/>
- <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
- <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
Modified: ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml?rev=685687&r1=685686&r2=685687&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/LookupScreens.xml Wed Aug 13 14:45:11 2008
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -23,9 +23,7 @@
<screen name="LookupFacility">
<section>
<condition>
- <or>
- <if-has-permission permission="FACILITY" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="facilityGenericPermission" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
@@ -49,9 +47,7 @@
<screen name="LookupFacilityLocation">
<section>
<condition>
- <or>
- <if-has-permission permission="FACILITY" action="_VIEW"/>
- </or>
+ <if-service-permission service-name="facilityGenericPermission" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
Modified: ofbiz/trunk/specialpurpose/assetmaint/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/servicedef/secas.xml?rev=685687&r1=685686&r2=685687&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/servicedef/secas.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/servicedef/secas.xml Wed Aug 13 14:45:11 2008
@@ -37,4 +37,14 @@
<action service="assetMaintPermissionCheck" mode="sync" result-to-result="true"/>
</eca>
+ <eca service="catalogPermissionCheck" event="return" run-on-failure="true">
+ <condition field-name="hasPermission" operator="equals" value="false" type="Boolean"/>
+ <action service="assetMaintPermissionCheck" mode="sync" result-to-result="true"/>
+ </eca>
+
+ <eca service="partyBasePermissionCheck" event="return" run-on-failure="true">
+ <condition field-name="hasPermission" operator="equals" value="false" type="Boolean"/>
+ <action service="assetMaintPermissionCheck" mode="sync" result-to-result="true"/>
+ </eca>
+
</service-eca>