svn commit: r506211 - /ofbiz/trunk/framework/common/script/org/ofbiz/common/permission/CommonPermissionServices.xml

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

svn commit: r506211 - /ofbiz/trunk/framework/common/script/org/ofbiz/common/permission/CommonPermissionServices.xml

jaz-3
Author: jaz
Date: Sun Feb 11 17:40:55 2007
New Revision: 506211

URL: http://svn.apache.org/viewvc?view=rev&rev=506211
Log:
updated common permision service to allow calling methods to set the mainAction

Modified:
    ofbiz/trunk/framework/common/script/org/ofbiz/common/permission/CommonPermissionServices.xml

Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/permission/CommonPermissionServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/permission/CommonPermissionServices.xml?view=diff&rev=506211&r1=506210&r2=506211
==============================================================================
--- ofbiz/trunk/framework/common/script/org/ofbiz/common/permission/CommonPermissionServices.xml (original)
+++ ofbiz/trunk/framework/common/script/org/ofbiz/common/permission/CommonPermissionServices.xml Sun Feb 11 17:40:55 2007
@@ -21,8 +21,11 @@
         xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd">
 
     <simple-method method-name="genericBasePermissionCheck" short-description="Basic Permission check">
-        <!-- This method should be put in common place so it can be called from anyware in ofbiz -->
-        <set field="mainAction" from-field="parameters.mainAction"/>
+        <!-- allow mainAction to be set from outside methods -->
+        <if-empty field-name="mainAction">
+            <set field="mainAction" from-field="parameters.mainAction"/>
+        </if-empty>
+
         <if-empty field-name="mainAction">
             <add-error><fail-property resource="CommonUiLabels" property="CommonPermissionMainActionAttributeMissing"/></add-error>
         </if-empty>