Author: deepak
Date: Tue Dec 18 16:46:34 2018
New Revision: 1849193
URL:
http://svn.apache.org/viewvc?rev=1849193&view=revLog:
Fixed: Inconsistent behaviour of ServiceDispatcher.checkAuth
(OFBIZ-10712)
We have checkAuth method in service dispatcher class, this method performs multiple auth related check.
if all checks passed it call the modelService.makeValid method to prepare service context (line#960) but this code executed only when service definition has a permission service call.
If service does not have any permission service call then it does not call the modelService.makeValid and this may cause the service validation issue unknown parameter found.
Ideally modelService.makeValid should call irrespective to permission service check.
Modified:
ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceDispatcher.java
Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceDispatcher.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceDispatcher.java?rev=1849193&r1=1849192&r2=1849193&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceDispatcher.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceDispatcher.java Tue Dec 18 16:46:34 2018
@@ -957,7 +957,6 @@ public class ServiceDispatcher {
}
if (hasPermission) {
context.putAll(permResp);
- context = origService.makeValid(context, ModelService.IN_PARAM);
} else {
String message = (String) permResp.get("failMessage");
if (UtilValidate.isEmpty(message)) {
@@ -974,7 +973,7 @@ public class ServiceDispatcher {
}
}
- return context;
+ return origService.makeValid(context, ModelService.IN_PARAM);
}
// gets a value object from name/password pair