You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2024/05/01 13:21:46 UTC

(ofbiz-framework) branch trunk updated: Fixed: Prevents to uselessly clutter the logs up with SetTimeZoneFromBrowser errors (OFBIZ-13061)

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 650284168d Fixed: Prevents to uselessly clutter the logs up with SetTimeZoneFromBrowser errors (OFBIZ-13061)
650284168d is described below

commit 650284168de5976a502fa5e7af8a4685ded50ce9
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Wed May 1 15:13:49 2024 +0200

    Fixed: Prevents to uselessly clutter the logs up with SetTimeZoneFromBrowser errors (OFBIZ-13061)
    
    The previous commits were not enough as I feared. This time we should not see
    useless "error" information while running services.
---
 .../src/main/java/org/apache/ofbiz/service/ServiceDispatcher.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/framework/service/src/main/java/org/apache/ofbiz/service/ServiceDispatcher.java b/framework/service/src/main/java/org/apache/ofbiz/service/ServiceDispatcher.java
index 39dc2369f2..4e4728c1f5 100644
--- a/framework/service/src/main/java/org/apache/ofbiz/service/ServiceDispatcher.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/ServiceDispatcher.java
@@ -379,7 +379,8 @@ public final class ServiceDispatcher {
                     context = checkAuth(localName, context, modelService);
                     GenericValue userLogin = (GenericValue) context.get("userLogin");
 
-                    if (modelService.isAuth() && userLogin == null) {
+
+                    if (modelService.isAuth() && userLogin == null && !modelService.getName().equals("SetTimeZoneFromBrowser")) {
                         rs.setEndStamp();
                         throw new ServiceAuthException("User authorization is required for this service: " + modelService.getName()
                                 + modelService.debugInfo());
@@ -738,7 +739,7 @@ public final class ServiceDispatcher {
                 context = checkAuth(localName, context, service);
                 Object userLogin = context.get("userLogin");
 
-                if (service.isAuth() && userLogin == null) {
+                if (service.isAuth() && userLogin == null && !service.getName().equals("SetTimeZoneFromBrowser")) {
                     throw new ServiceAuthException("User authorization is required for this service: " + service.getName() + service.debugInfo());
                 }