|
Author: mor
Date: Sat Apr 3 16:11:53 2010 New Revision: 930537 URL: http://svn.apache.org/viewvc?rev=930537&view=rev Log: Moved permission checking logic to service definition. Applied applications only part of my patch from jira issue OFBIZ-3632 (https://issues.apache.org/jira/browse/OFBIZ-3632) Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml ofbiz/trunk/applications/product/servicedef/services_shipment.xml Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml?rev=930537&r1=930536&r2=930537&view=diff ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml Sat Apr 3 16:11:53 2010 @@ -22,9 +22,6 @@ under the License. xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd"> <!-- ItemIssuance services --> <simple-method method-name="createItemIssuance" short-description="Create ItemIssuance"> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run createItemIssuance you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Create ItemIssuance" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked" xml-resource="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml"/> <check-errors/> @@ -50,9 +47,6 @@ under the License. </if-not-empty> </simple-method> <simple-method method-name="updateItemIssuance" short-description="Update ItemIssuance"> - <check-permission permission="FACILITY" action="_UPDATE"> - <fail-message message="Security Error: to run updateItemIssuance you must have the FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Update ItemIssuance" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked" xml-resource="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml"/> <check-errors/> @@ -62,9 +56,6 @@ under the License. <store-value value-field="lookedUpValue"/> </simple-method> <simple-method method-name="deleteItemIssuance" short-description="Delete ItemIssuance"> - <check-permission permission="FACILITY" action="_DELETE"> - <fail-message message="Security Error: to run deleteItemIssuance you must have the FACILITY_DELETE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Delete ItemIssuance" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked" xml-resource="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml"/> <check-errors/> @@ -75,27 +66,19 @@ under the License. <!-- ItemIssuanceRole services --> <simple-method method-name="createItemIssuanceRole" short-description="Create ItemIssuanceRole"> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run createItemIssuanceRole you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Create ItemIssuanceRole" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked" xml-resource="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml"/> <check-errors/> - <make-value value-field="newEntity" entity-name="ItemIssuanceRole"/> <set-pk-fields map="parameters" value-field="newEntity"/> <set-nonpk-fields map="parameters" value-field="newEntity"/> - <create-value value-field="newEntity"/> </simple-method> + <simple-method method-name="deleteItemIssuanceRole" short-description="Delete ItemIssuanceRole"> - <check-permission permission="FACILITY" action="_DELETE"> - <fail-message message="Security Error: to run deleteItemIssuanceRole you must have the FACILITY_DELETE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Delete ItemIssuanceRole" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked" xml-resource="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml"/> <check-errors/> - <entity-one entity-name="ItemIssuanceRole" value-field="lookedUpValue"/> <remove-value value-field="lookedUpValue"/> </simple-method> @@ -103,12 +86,6 @@ under the License. <!-- the actual issuance services --> <simple-method method-name="issueOrderItemToShipment" short-description="Issue OrderItem to Shipment"> <set value="Issue OrderItem to Shipment" field="operationName"/> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run ${operationName} you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> - <check-permission permission="FACILITY" action="_UPDATE"> - <fail-message message="Security Error: to run ${operationName} you must have the FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> <call-simple-method method-name="checkCanChangeShipmentStatusPacked" xml-resource="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml"/> <!-- get orderHeader --> @@ -137,12 +114,6 @@ under the License. <simple-method method-name="issueOrderItemShipGrpInvResToShipment" short-description="Issue OrderItemShipGrpInvRes to Shipment"> <set value="Issue OrderItemShipGrpInvRes to Shipment" field="operationName"/> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run ${operationName} you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> - <check-permission permission="FACILITY" action="_UPDATE"> - <fail-message message="Security Error: to run ${operationName} you must have the FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> <call-simple-method method-name="checkCanChangeShipmentStatusPacked" xml-resource="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml"/> <!-- get orderItemShipGrpInvRes --> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml?rev=930537&r1=930536&r2=930537&view=diff ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml Sat Apr 3 16:11:53 2010 @@ -22,11 +22,6 @@ under the License. xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd"> <!-- Shipment services --> <simple-method method-name="createShipment" short-description="Create Shipment"> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run createShipment you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> - <check-errors/> - <make-value value-field="newEntity" entity-name="Shipment"/> <set-nonpk-fields map="parameters" value-field="newEntity"/> @@ -99,9 +94,6 @@ under the License. </if-not-empty> </simple-method> <simple-method method-name="updateShipment" short-description="Update Shipment"> - <check-permission permission="FACILITY" action="_UPDATE"> - <fail-message message="Security Error: to run updateShipment you must have the FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Update Shipment" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusDelivered"/> @@ -289,14 +281,11 @@ under the License. <field-to-result field="lookedUpValue.shipmentId" result-name="shipmentId"/> <store-value value-field="lookedUpValue"/> </simple-method> + <simple-method method-name="deleteShipment" short-description="Delete Shipment"> - <check-permission permission="FACILITY" action="_DELETE"> - <fail-message message="Security Error: to run deleteShipment you must have the FACILITY_DELETE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Delete Shipment" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> - <entity-one entity-name="Shipment" value-field="lookedUpValue"/> <remove-value value-field="lookedUpValue"/> </simple-method> @@ -409,12 +398,6 @@ under the License. </simple-method> <simple-method method-name="setShipmentSettingsFromPrimaryOrder" short-description="Set Shipment Settings From Primary Order"> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run setShipmentSettingsFromPrimaryOrder you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> - <check-permission permission="FACILITY" action="_UPDATE"> - <fail-message message="Security Error: to run setShipmentSettingsFromPrimaryOrder you must have the FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Set Shipment Settings From Primary Order" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -657,12 +640,6 @@ under the License. </simple-method> <simple-method method-name="setShipmentSettingsFromFacilities" short-description="Set Shipment Settings From Facilities"> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run setShipmentSettingsFromFacilities you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> - <check-permission permission="FACILITY" action="_UPDATE"> - <fail-message message="Security Error: to run setShipmentSettingsFromFacilities you must have the FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Set Shipment Settings From Facilities" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -724,12 +701,6 @@ under the License. </simple-method> <simple-method method-name="sendShipmentScheduledNotification" short-description="Send Shipment Scheduled Notification"> - <check-permission permission="FACILITY" action="_CREATE"> - <alt-permission permission="FACILITY" action="_UPDATE"/> - <fail-message message="Security Error: to run createShipmentItem you must have the FACILITY_CREATE, FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> - <check-errors/> - <entity-one entity-name="Shipment" value-field="shipment"/> <!-- find email address for currently logged in user, set as sendFrom --> @@ -794,12 +765,6 @@ under the License. </simple-method> <simple-method method-name="balanceItemIssuancesForShipment" short-description="Release the purchase order's items assigned to the shipment but not actually received"> - <check-permission permission="FACILITY" action="_CREATE"> - <alt-permission permission="FACILITY" action="_UPDATE"/> - <fail-message message="Security Error: to run balanceItemIssuancesForShipment you must have the FACILITY_CREATE, FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> - <check-errors/> - <entity-one entity-name="Shipment" value-field="shipment"/> <get-related value-field="shipment" relation-name="ItemIssuance" list="issuances"/> <iterate list="issuances" entry="issuance"> @@ -823,9 +788,6 @@ under the License. <!-- ShipmentItem services --> <simple-method method-name="createShipmentItem" short-description="Create ShipmentItem"> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run createShipmentItem you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Create ShipmentItem" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -839,9 +801,6 @@ under the License. <create-value value-field="newEntity"/> </simple-method> <simple-method method-name="updateShipmentItem" short-description="Update ShipmentItem"> - <check-permission permission="FACILITY" action="_UPDATE"> - <fail-message message="Security Error: to run updateShipmentItem you must have the FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Update ShipmentItem" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -853,9 +812,6 @@ under the License. <store-value value-field="lookedUpValue"/> </simple-method> <simple-method method-name="deleteShipmentItem" short-description="Delete ShipmentItem"> - <check-permission permission="FACILITY" action="_DELETE"> - <fail-message message="Security Error: to run deleteShipmentItem you must have the FACILITY_DELETE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Delete ShipmentItem" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -960,9 +916,6 @@ under the License. <!-- ShipmentPackage services --> <simple-method method-name="createShipmentPackage" short-description="Create ShipmentPackage"> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run createShipmentPackage you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Create ShipmentPackage" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -988,9 +941,6 @@ under the License. <call-simple-method method-name="ensurePackageRouteSeg"/> </simple-method> <simple-method method-name="updateShipmentPackage" short-description="Update ShipmentPackage"> - <check-permission permission="FACILITY" action="_UPDATE"> - <fail-message message="Security Error: to run updateShipmentPackage you must have the FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Update ShipmentPackage" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusShipped"/> <check-errors/> @@ -1006,9 +956,6 @@ under the License. <call-simple-method method-name="ensurePackageRouteSeg"/> </simple-method> <simple-method method-name="deleteShipmentPackage" short-description="Delete ShipmentPackage"> - <check-permission permission="FACILITY" action="_DELETE"> - <fail-message message="Security Error: to run deleteShipmentPackage you must have the FACILITY_DELETE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Delete ShipmentPackage" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -1053,9 +1000,6 @@ under the License. <!-- ShipmentPackageContent services --> <simple-method method-name="createShipmentPackageContent" short-description="Create ShipmentPackageContent"> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run createShipmentPackageContent you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Create ShipmentPackageContent" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -1068,9 +1012,6 @@ under the License. <field-to-result field="newEntity.shipmentPackageSeqId" result-name="shipmentPackageSeqId"/> </simple-method> <simple-method method-name="updateShipmentPackageContent" short-description="Update ShipmentPackageContent"> - <check-permission permission="FACILITY" action="_UPDATE"> - <fail-message message="Security Error: to run updateShipmentPackageContent you must have the FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Update ShipmentPackageContent" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -1082,9 +1023,6 @@ under the License. <store-value value-field="lookedUpValue"/> </simple-method> <simple-method method-name="deleteShipmentPackageContent" short-description="Delete ShipmentPackageContent"> - <check-permission permission="FACILITY" action="_DELETE"> - <fail-message message="Security Error: to run deleteShipmentPackageContent you must have the FACILITY_DELETE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Delete ShipmentPackageContent" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -1095,9 +1033,6 @@ under the License. <remove-value value-field="lookedUpValue"/> </simple-method> <simple-method method-name="addShipmentContentToPackage" short-description="Add Shipment Content To Package"> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run addShipmentContentToPackage you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Create ShipmentPackageContent" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -1126,11 +1061,6 @@ under the License. <!-- ShipmentPackageRouteSeg services --> <simple-method method-name="createShipmentPackageRouteSeg" short-description="Create ShipmentPackageRouteSeg"> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run createShipmentPackageRouteSeg you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> - <check-errors/> - <make-value value-field="newEntity" entity-name="ShipmentPackageRouteSeg"/> <set-pk-fields map="parameters" value-field="newEntity"/> <set-nonpk-fields map="parameters" value-field="newEntity"/> @@ -1138,11 +1068,6 @@ under the License. <create-value value-field="newEntity"/> </simple-method> <simple-method method-name="updateShipmentPackageRouteSeg" short-description="Update ShipmentPackageRouteSeg"> - <check-permission permission="FACILITY" action="_UPDATE"> - <fail-message message="Security Error: to run updateShipmentPackageRouteSeg you must have the FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> - <check-errors/> - <make-value value-field="lookupPKMap" entity-name="ShipmentPackageRouteSeg"/> <set-pk-fields map="parameters" value-field="lookupPKMap"/> <find-by-primary-key entity-name="ShipmentPackageRouteSeg" map="lookupPKMap" value-field="lookedUpValue"/> @@ -1150,9 +1075,6 @@ under the License. <store-value value-field="lookedUpValue"/> </simple-method> <simple-method method-name="deleteShipmentPackageRouteSeg" short-description="Delete ShipmentPackageRouteSeg"> - <check-permission permission="FACILITY" action="_DELETE"> - <fail-message message="Security Error: to run deleteShipmentPackageRouteSeg you must have the FACILITY_DELETE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Delete ShipmentPackageRouteSeg" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -1165,11 +1087,6 @@ under the License. <!-- ShipmentContactMech services --> <simple-method method-name="createShipmentContactMech" short-description="Create ShipmentContactMech"> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run createShipmentContactMech you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> - <check-errors/> - <make-value value-field="newEntity" entity-name="ShipmentContactMech"/> <set-pk-fields map="parameters" value-field="newEntity"/> <set-nonpk-fields map="parameters" value-field="newEntity"/> @@ -1177,11 +1094,6 @@ under the License. <create-value value-field="newEntity"/> </simple-method> <simple-method method-name="updateShipmentContactMech" short-description="Update ShipmentContactMech"> - <check-permission permission="FACILITY" action="_UPDATE"> - <fail-message message="Security Error: to run updateShipmentContactMech you must have the FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> - <check-errors/> - <make-value value-field="lookupPKMap" entity-name="ShipmentContactMech"/> <set-pk-fields map="parameters" value-field="lookupPKMap"/> <find-by-primary-key entity-name="ShipmentContactMech" map="lookupPKMap" value-field="lookedUpValue"/> @@ -1189,9 +1101,6 @@ under the License. <store-value value-field="lookedUpValue"/> </simple-method> <simple-method method-name="deleteShipmentContactMech" short-description="Delete ShipmentContactMech"> - <check-permission permission="FACILITY" action="_DELETE"> - <fail-message message="Security Error: to run deleteShipmentContactMech you must have the FACILITY_DELETE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Delete ShipmentContactMech" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -1204,9 +1113,6 @@ under the License. <!-- ShipmentRouteSegment services --> <simple-method method-name="createShipmentRouteSegment" short-description="Create ShipmentRouteSegment"> - <check-permission permission="FACILITY" action="_CREATE"> - <fail-message message="Security Error: to run createShipmentRouteSegment you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Create ShipmentRouteSegment" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> @@ -1230,9 +1136,6 @@ under the License. <call-simple-method method-name="ensureRouteSegPackage"/> </simple-method> <simple-method method-name="updateShipmentRouteSegment" short-description="Update ShipmentRouteSegment"> - <check-permission permission="FACILITY" action="_UPDATE"> - <fail-message message="Security Error: to run updateShipmentRouteSegment you must have the FACILITY_UPDATE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Update ShipmentRouteSegment" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusDelivered"/> <check-errors/> @@ -1254,9 +1157,6 @@ under the License. <call-simple-method method-name="ensureRouteSegPackage"/> </simple-method> <simple-method method-name="deleteShipmentRouteSegment" short-description="Delete ShipmentRouteSegment"> - <check-permission permission="FACILITY" action="_DELETE"> - <fail-message message="Security Error: to run deleteShipmentRouteSegment you must have the FACILITY_DELETE or FACILITY_ADMIN permission"/> - </check-permission> <set value="Delete ShipmentRouteSegment" field="operationName"/> <call-simple-method method-name="checkCanChangeShipmentStatusPacked"/> <check-errors/> Modified: ofbiz/trunk/applications/product/servicedef/services_shipment.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_shipment.xml?rev=930537&r1=930536&r2=930537&view=diff ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services_shipment.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services_shipment.xml Sat Apr 3 16:11:53 2010 @@ -133,6 +133,7 @@ under the License. <service name="createShipment" default-entity-name="Shipment" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="createShipment" auth="true"> <description>Create Shipment</description> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="OUT" optional="false"/> <auto-attributes include="pk" mode="IN" optional="true"/> <auto-attributes include="nonpk" mode="IN" optional="true"> @@ -145,6 +146,7 @@ under the License. <service name="updateShipment" default-entity-name="Shipment" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="updateShipment" auth="true"> <description>Update Shipment</description> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="INOUT" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"> <exclude field-name="shipmentTypeId"/> @@ -163,21 +165,34 @@ under the License. <service name="deleteShipment" default-entity-name="Shipment" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="deleteShipment" auth="true"> <description>Delete Shipment</description> + <permission-service service-name="facilityGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> <service name="setShipmentSettingsFromPrimaryOrder" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="setShipmentSettingsFromPrimaryOrder" auth="true"> <description>Set Shipment Settings From Primary Order</description> + <required-permissions join-type="AND"> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> + </required-permissions> <attribute name="shipmentId" type="String" mode="IN" optional="false"/> </service> <service name="setShipmentSettingsFromFacilities" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="setShipmentSettingsFromFacilities" auth="true"> <description>Set Shipment Settings From Facilities</description> + <required-permissions join-type="AND"> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> + </required-permissions> <attribute name="shipmentId" type="String" mode="IN" optional="false"/> </service> <service name="sendShipmentScheduledNotification" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="sendShipmentScheduledNotification" auth="true"> <description>Send Shipment Scheduled Notification</description> + <required-permissions join-type="OR"> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> + </required-permissions> <attribute name="shipmentId" type="String" mode="IN" optional="false"/> </service> <service name="balanceItemIssuancesForShipment" engine="simple" @@ -187,6 +202,10 @@ under the License. actually received; it is invoked as a seca when the purchase shipment is marked as 'received' </description> + <required-permissions join-type="OR"> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> + </required-permissions> <attribute name="shipmentId" type="String" mode="IN" optional="false"/> </service> <service name="checkCancelItemIssuanceAndOrderShipmentFromShipment" engine="simple" @@ -207,6 +226,7 @@ under the License. <service name="createShipmentItem" default-entity-name="ShipmentItem" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="createShipmentItem" auth="true"> <description>Create ShipmentItem</description> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="shipmentItemSeqId" mode="INOUT" optional="true"/> @@ -214,12 +234,14 @@ under the License. <service name="updateShipmentItem" default-entity-name="ShipmentItem" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="updateShipmentItem" auth="true"> <description>Update ShipmentItem</description> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <service name="deleteShipmentItem" default-entity-name="ShipmentItem" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="deleteShipmentItem" auth="true"> <description>Delete ShipmentItem</description> + <permission-service service-name="facilityGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> @@ -237,6 +259,7 @@ under the License. <service name="createShipmentPackage" default-entity-name="ShipmentPackage" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="createShipmentPackage" auth="true"> <description>Create ShipmentPackage</description> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"> <exclude field-name="dateCreated"/> @@ -246,12 +269,14 @@ under the License. <service name="updateShipmentPackage" default-entity-name="ShipmentPackage" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="updateShipmentPackage" auth="true"> <description>Update ShipmentPackage</description> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <service name="deleteShipmentPackage" default-entity-name="ShipmentPackage" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="deleteShipmentPackage" auth="true"> <description>Delete ShipmentPackage</description> + <permission-service service-name="facilityGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> @@ -259,6 +284,7 @@ under the License. <service name="createShipmentPackageContent" default-entity-name="ShipmentPackageContent" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="createShipmentPackageContent" auth="true"> <description>Create ShipmentPackageContent</description> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="shipmentPackageSeqId" mode="INOUT" optional="false"/> @@ -266,17 +292,20 @@ under the License. <service name="updateShipmentPackageContent" default-entity-name="ShipmentPackageContent" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="updateShipmentPackageContent" auth="true"> <description>Update ShipmentPackageContent</description> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <service name="deleteShipmentPackageContent" default-entity-name="ShipmentPackageContent" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="deleteShipmentPackageContent" auth="true"> <description>Delete ShipmentPackageContent</description> + <permission-service service-name="facilityGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> <service name="addShipmentContentToPackage" default-entity-name="ShipmentPackageContent" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="addShipmentContentToPackage" auth="true"> <description>Add Shipment Content To Package</description> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="quantity" mode="IN" optional="false"/> @@ -287,18 +316,21 @@ under the License. <service name="createShipmentPackageRouteSeg" default-entity-name="ShipmentPackageRouteSeg" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="createShipmentPackageRouteSeg" auth="true"> <description>Create ShipmentPackageRouteSeg</description> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <service name="updateShipmentPackageRouteSeg" default-entity-name="ShipmentPackageRouteSeg" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="updateShipmentPackageRouteSeg" auth="true"> <description>Update ShipmentPackageRouteSeg</description> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <service name="deleteShipmentPackageRouteSeg" default-entity-name="ShipmentPackageRouteSeg" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="deleteShipmentPackageRouteSeg" auth="true"> <description>Delete ShipmentPackageRouteSeg</description> + <permission-service service-name="facilityGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> @@ -306,18 +338,21 @@ under the License. <service name="createShipmentContactMech" default-entity-name="ShipmentContactMech" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="createShipmentContactMech" auth="true"> <description>Create ShipmentContactMech</description> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <service name="updateShipmentContactMech" default-entity-name="ShipmentContactMech" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="updateShipmentContactMech" auth="true"> <description>Update ShipmentContactMech</description> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <service name="deleteShipmentContactMech" default-entity-name="ShipmentContactMech" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="deleteShipmentContactMech" auth="true"> <description>Delete ShipmentContactMech</description> + <permission-service service-name="facilityGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> @@ -325,6 +360,7 @@ under the License. <service name="createShipmentRouteSegment" default-entity-name="ShipmentRouteSegment" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="createShipmentRouteSegment" auth="true"> <description>Create ShipmentRouteSegment</description> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="shipmentRouteSegmentId" mode="INOUT" optional="true"/> @@ -332,12 +368,14 @@ under the License. <service name="updateShipmentRouteSegment" default-entity-name="ShipmentRouteSegment" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="updateShipmentRouteSegment" auth="true"> <description>Update ShipmentRouteSegment</description> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <service name="deleteShipmentRouteSegment" default-entity-name="ShipmentRouteSegment" engine="simple" location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="deleteShipmentRouteSegment" auth="true"> <description>Delete ShipmentRouteSegment</description> + <permission-service service-name="facilityGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> <service name="duplicateShipmentRouteSegment" default-entity-name="ShipmentRouteSegment" engine="java" @@ -361,18 +399,21 @@ under the License. <service name="createItemIssuance" default-entity-name="ItemIssuance" engine="simple" location="component://product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml" invoke="createItemIssuance" auth="true"> <description>Create ItemIssuance</description> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="OUT" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <service name="updateItemIssuance" default-entity-name="ItemIssuance" engine="simple" location="component://product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml" invoke="updateItemIssuance" auth="true"> <description>Update ItemIssuance</description> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> <service name="deleteItemIssuance" default-entity-name="ItemIssuance" engine="simple" location="component://product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml" invoke="deleteItemIssuance" auth="true"> <description>Delete ItemIssuance</description> + <permission-service service-name="facilityGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> @@ -380,17 +421,23 @@ under the License. <service name="createItemIssuanceRole" default-entity-name="ItemIssuanceRole" engine="simple" location="component://product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml" invoke="createItemIssuanceRole" auth="true"> <description>Create ItemIssuanceRole</description> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> <service name="deleteItemIssuanceRole" default-entity-name="ItemIssuanceRole" engine="simple" location="component://product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml" invoke="deleteItemIssuanceRole" auth="true"> <description>Delete ItemIssuanceRole</description> + <permission-service service-name="facilityGenericPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> </service> <service name="issueOrderItemToShipment" engine="simple" location="component://product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml" invoke="issueOrderItemToShipment" auth="true"> <description>Issue an OrderItem to a Shipment - only for non-sales orders</description> + <required-permissions join-type="AND"> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> + </required-permissions> <auto-attributes entity-name="Shipment" include="pk" mode="IN" optional="false"/> <auto-attributes entity-name="OrderItemShipGroupAssoc" include="pk" mode="IN" optional="false"/> <attribute name="quantity" type="BigDecimal" mode="IN" optional="false"/> @@ -399,6 +446,10 @@ under the License. <service name="issueOrderItemShipGrpInvResToShipment" engine="simple" location="component://product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml" invoke="issueOrderItemShipGrpInvResToShipment" auth="true"> <description>Add an OrderItemShipGrpInvRes to a Shipment - only for sales orders</description> + <required-permissions join-type="AND"> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> + <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/> + </required-permissions> <auto-attributes entity-name="Shipment" include="pk" mode="IN" optional="false"/> <auto-attributes entity-name="OrderItemShipGrpInvRes" include="pk" mode="IN" optional="false"/> <attribute name="quantity" type="BigDecimal" mode="IN" optional="false"/> |
| Free forum by Nabble | Edit this page |
