Author: jacopoc
Date: Fri Feb  9 12:33:06 2007
New Revision: 505482

URL: http://svn.apache.org/viewvc?view=rev&rev=505482
Log:
If the include-user-login attribute for the minilang service call methods is 
not set or it is true, the user login is put in the context but only if in the 
context there is not already a user login.
Thanks to David Jones for the review and to Dave Napolitan for bringing this up 
to my attention.

Modified:
    
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java
    
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java

Modified: 
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java?view=diff&rev=505482&r1=505481&r2=505482
==============================================================================
--- 
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java
 (original)
+++ 
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallService.java
 Fri Feb  9 12:33:06 2007
@@ -213,7 +213,7 @@
         if (includeUserLogin) {
             GenericValue userLogin = methodContext.getUserLogin();
 
-            if (userLogin != null) {
+            if (userLogin != null && inMap.get("userLogin") == null) {
                 inMap.put("userLogin", userLogin);
             }
         }

Modified: 
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java?view=diff&rev=505482&r1=505481&r2=505482
==============================================================================
--- 
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java
 (original)
+++ 
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallServiceAsynch.java
 Fri Feb  9 12:33:06 2007
@@ -68,8 +68,9 @@
         if (includeUserLogin) {
             GenericValue userLogin = methodContext.getUserLogin();
 
-            if (userLogin != null)
+            if (userLogin != null && inMap.get("userLogin") == null) {
                 inMap.put("userLogin", userLogin);
+            }
         }
         
         // always add Locale to context unless null


Reply via email to