svn commit: r1052050 - in /ofbiz/trunk/framework: entityext/script/org/ofbiz/entityext/synchronization/EntitySyncServices.xml example/config/ExampleUiLabels.xml example/script/org/ofbiz/example/ExamplePermissionServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1052050 - in /ofbiz/trunk/framework: entityext/script/org/ofbiz/entityext/synchronization/EntitySyncServices.xml example/config/ExampleUiLabels.xml example/script/org/ofbiz/example/ExamplePermissionServices.xml

mrisaliti
Author: mrisaliti
Date: Wed Dec 22 19:51:55 2010
New Revision: 1052050

URL: http://svn.apache.org/viewvc?rev=1052050&view=rev
Log:
Replace some fail-message to fail-property tag all entityext/example components (OFBIZ-1874)

Modified:
    ofbiz/trunk/framework/entityext/script/org/ofbiz/entityext/synchronization/EntitySyncServices.xml
    ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
    ofbiz/trunk/framework/example/script/org/ofbiz/example/ExamplePermissionServices.xml

Modified: ofbiz/trunk/framework/entityext/script/org/ofbiz/entityext/synchronization/EntitySyncServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/script/org/ofbiz/entityext/synchronization/EntitySyncServices.xml?rev=1052050&r1=1052049&r2=1052050&view=diff
==============================================================================
--- ofbiz/trunk/framework/entityext/script/org/ofbiz/entityext/synchronization/EntitySyncServices.xml (original)
+++ ofbiz/trunk/framework/entityext/script/org/ofbiz/entityext/synchronization/EntitySyncServices.xml Wed Dec 22 19:51:55 2010
@@ -21,7 +21,9 @@ under the License.
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
     <simple-method method-name="createEntitySync" short-description="Create a EntitySync">
-        <check-permission permission="ENTITY_SYNC" action="_CREATE"><fail-message message="Security Error: to run createEntitySync you must have the ENTITY_SYNC_CREATE or ENTITY_SYNC_ADMIN permission"/></check-permission>
+        <check-permission permission="ENTITY_SYNC" action="_CREATE">
+            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
+        </check-permission>
         <check-errors/>
 
         <make-value value-field="newEntity" entity-name="EntitySync"/>
@@ -34,7 +36,9 @@ under the License.
         <create-value value-field="newEntity"/>
     </simple-method>
     <simple-method method-name="updateEntitySync" short-description="Update a EntitySync">
-        <check-permission permission="ENTITY_SYNC" action="_UPDATE"><fail-message message="Security Error: to run updateEntitySync you must have the ENTITY_SYNC_UPDATE or ENTITY_SYNC_ADMIN permission"/></check-permission>
+        <check-permission permission="ENTITY_SYNC" action="_UPDATE">
+            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
+        </check-permission>
         <check-errors/>
 
         <set field="lookupPKMap.entitySyncId" from-field="parameters.entitySyncId"/>
@@ -43,7 +47,9 @@ under the License.
         <store-value value-field="valueToStore"/>
     </simple-method>
     <simple-method method-name="resetEntitySyncStatusToNotStarted" short-description="Update a EntitySync, set the Status to ESR_NOT_STARTED, but ONLY if running (ie in ESR_RUNNING)">
-        <check-permission permission="ENTITY_SYNC" action="_UPDATE"><fail-message message="Security Error: to run resetEntitySyncStatusToNotStarted you must have the ENTITY_SYNC_UPDATE or ENTITY_SYNC_ADMIN permission"/></check-permission>
+        <check-permission permission="ENTITY_SYNC" action="_UPDATE">
+            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
+        </check-permission>
         <check-errors/>
 
         <!-- TODO: add some code to make sure, as much as possible, that this really isn't running -->
@@ -57,7 +63,9 @@ under the License.
 
     <!-- EntitySyncHistory services -->
     <simple-method method-name="createEntitySyncHistory" short-description="Create EntitySyncHistory">
-        <check-permission permission="ENTITY_SYNC" action="_CREATE"><fail-message message="Security Error: to run createEntitySyncHistory you must have the ENTITY_SYNC_CREATE or ENTITY_SYNC_ADMIN permission"/></check-permission>
+        <check-permission permission="ENTITY_SYNC" action="_CREATE">
+            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
+        </check-permission>
         <check-errors/>
 
         <make-value value-field="newEntity" entity-name="EntitySyncHistory"/>
@@ -73,7 +81,9 @@ under the License.
         <store-value value-field="entitySync"/>
     </simple-method>
     <simple-method method-name="updateEntitySyncHistory" short-description="Update EntitySyncHistory">
-        <check-permission permission="ENTITY_SYNC" action="_UPDATE"><fail-message message="Security Error: to run updateEntitySyncHistory you must have the ENTITY_SYNC_UPDATE or ENTITY_SYNC_ADMIN permission"/></check-permission>
+        <check-permission permission="ENTITY_SYNC" action="_UPDATE">
+            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
+        </check-permission>
         <check-errors/>
 
         <make-value value-field="lookupPKMap" entity-name="EntitySyncHistory"/>
@@ -83,7 +93,9 @@ under the License.
         <store-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteEntitySyncHistory" short-description="Delete EntitySyncHistory">
-        <check-permission permission="ENTITY_SYNC" action="_DELETE"><fail-message message="Security Error: to run deleteEntitySyncHistory you must have the ENTITY_SYNC_DELETE or ENTITY_SYNC_ADMIN permission"/></check-permission>
+        <check-permission permission="ENTITY_SYNC" action="_DELETE">
+            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
+        </check-permission>
         <check-errors/>
 
         <make-value value-field="lookupPKMap" entity-name="EntitySyncHistory"/>
@@ -94,7 +106,9 @@ under the License.
 
     <!-- EntitySyncInclude services -->
     <simple-method method-name="createEntitySyncInclude" short-description="Create EntitySyncInclude">
-        <check-permission permission="ENTITY_SYNC" action="_CREATE"><fail-message message="Security Error: to run createEntitySyncInclude you must have the ENTITY_SYNC_CREATE or ENTITY_SYNC_ADMIN permission"/></check-permission>
+        <check-permission permission="ENTITY_SYNC" action="_CREATE">
+            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
+        </check-permission>
         <check-errors/>
 
         <make-value value-field="newEntity" entity-name="EntitySyncInclude"/>
@@ -103,7 +117,9 @@ under the License.
         <create-value value-field="newEntity"/>
     </simple-method>
     <simple-method method-name="updateEntitySyncInclude" short-description="Update EntitySyncInclude">
-        <check-permission permission="ENTITY_SYNC" action="_UPDATE"><fail-message message="Security Error: to run updateEntitySyncInclude you must have the ENTITY_SYNC_UPDATE or ENTITY_SYNC_ADMIN permission"/></check-permission>
+        <check-permission permission="ENTITY_SYNC" action="_UPDATE">
+            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
+        </check-permission>
         <check-errors/>
 
         <make-value value-field="lookupPKMap" entity-name="EntitySyncInclude"/>
@@ -113,7 +129,9 @@ under the License.
         <store-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="deleteEntitySyncInclude" short-description="Delete EntitySyncInclude">
-        <check-permission permission="ENTITY_SYNC" action="_DELETE"><fail-message message="Security Error: to run deleteEntitySyncInclude you must have the ENTITY_SYNC_DELETE or ENTITY_SYNC_ADMIN permission"/></check-permission>
+        <check-permission permission="ENTITY_SYNC" action="_DELETE">
+            <fail-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
+        </check-permission>
         <check-errors/>
 
         <make-value value-field="lookupPKMap" entity-name="EntitySyncInclude"/>

Modified: ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleUiLabels.xml?rev=1052050&r1=1052049&r2=1052050&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/config/ExampleUiLabels.xml (original)
+++ ofbiz/trunk/framework/example/config/ExampleUiLabels.xml Wed Dec 22 19:51:55 2010
@@ -541,6 +541,10 @@
         <value xml:lang="th">ข้อผิดพลาดในส่วนของความปลอดภัย: ในการรัน ${resourceDescription} คุณต้องได้รับอนุญาตจาก EXAMPLE_${mainAction} หรือ EXAMPLE_ADMIN ก่อน</value>
         <value xml:lang="zh">安全错误: 要运行${methodShortDescription},你必须具有EXAMPLE${securityAction}或EXAMPLE_ADMIN权限</value>
     </property>
+    <property key="ExamplePermissionMainActionAttributeMissing">
+        <value xml:lang="en">In the permission-service element for the exampleGenericPermission service the main-action attribute was missing but is required</value>
+        <value xml:lang="it">Nell'elemento permission-service per il servizio exampleGenericPermission l'attributo è mancancate ma è richiesto</value>
+    </property>
     <property key="ExamplePointAddress">
         <value xml:lang="en">Geolocation via address</value>
         <value xml:lang="fr">Géolocalisation par l'adresse</value>

Modified: ofbiz/trunk/framework/example/script/org/ofbiz/example/ExamplePermissionServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/script/org/ofbiz/example/ExamplePermissionServices.xml?rev=1052050&r1=1052049&r2=1052050&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/script/org/ofbiz/example/ExamplePermissionServices.xml (original)
+++ ofbiz/trunk/framework/example/script/org/ofbiz/example/ExamplePermissionServices.xml Wed Dec 22 19:51:55 2010
@@ -24,7 +24,10 @@ under the License.
     <simple-method method-name="exampleGenericPermission" short-description="Main permission logic">
         <set field="mainAction" from-field="parameters.mainAction"/>
         <if-empty field="mainAction">
-            <add-error><fail-message message="In the permission-service element for the exampleGenericPermission service the main-action attribute was missing but is required"/></add-error>
+            <add-error>
+            <fail-message message="In the permission-service element for the exampleGenericPermission service the main-action attribute was missing but is required"/>
+                <fail-property resource="ExampleUiLabels" property="ExamplePermissionMainActionAttributeMissing"/>
+            </add-error>
             <check-errors/>
         </if-empty>
         <if-has-permission permission="EXAMPLE" action="_${parameters.mainAction}">