You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2007/10/21 21:13:07 UTC

svn commit: r586938 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java

Author: doogie
Date: Sun Oct 21 12:13:06 2007
New Revision: 586938

URL: http://svn.apache.org/viewvc?rev=586938&view=rev
Log:
Undo revision 586470; I missed a spot in checkAuth that changed
the context, after a call to makeValid.

Modified:
    ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java?rev=586938&r1=586937&r2=586938&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java Sun Oct 21 12:13:06 2007
@@ -334,7 +334,7 @@
                     
                     //Debug.logInfo("After [" + modelService.name + "] pre-auth ECA, before auth; isFailure=" + isFailure + ", isError=" + isError, module);
 
-                    checkAuth(localName, context, modelService);
+                    context = checkAuth(localName, context, modelService);
                     Object userLogin = context.get("userLogin");
 
                     if (modelService.auth && userLogin == null) {
@@ -646,7 +646,7 @@
                 // pre-auth ECA
                 if (eventMap != null) ServiceEcaUtil.evalRules(service.name, eventMap, "auth", ctx, context, result, isError, isFailure);
 
-                checkAuth(localName, context, service);
+                context = checkAuth(localName, context, service);
                 Object userLogin = context.get("userLogin");
 
                 if (service.auth && userLogin == null) {
@@ -821,7 +821,7 @@
     }
 
     // checks if parameters were passed for authentication
-    private void checkAuth(String localName, Map<String, Object> context, ModelService origService) throws ServiceAuthException, GenericServiceException {
+    private Map<String, Object> checkAuth(String localName, Map<String, Object> context, ModelService origService) throws ServiceAuthException, GenericServiceException {
         String service = ServiceConfigUtil.getElementAttr("authorization", "service-name");
 
         if (service == null) {
@@ -829,7 +829,7 @@
         }
         if (service.equals(origService.name)) {
             // manually calling the auth service, don't continue...
-            return;
+            return context;
         }
 
         if (context.containsKey("login.username")) {
@@ -898,7 +898,7 @@
             }
         }
 
-        return;
+        return context;
     }
 
     // gets a value object from name/password pair