From f226ef24e15234efa07d151e2553f3ef205fdf09 Mon Sep 17 00:00:00 2001 From: abirembaut Date: Wed, 13 Sep 2023 21:21:35 +0200 Subject: [PATCH] fix(maintenance mode): Redirect to UID error pages even in maintenance (#2714) * do not check for maintenance mode in error servlet (This is necessary to display the 503 page) * make Maintenance API available in maintenance (necessary to display the maintenance message in the 503 page) Relates to [DEV-479](https://bonitasoft.atlassian.net/browse/DEV-479) --------- Co-authored-by: Bonita CI --- .../org/bonitasoft/engine/api/impl/MaintenanceAPIImpl.java | 1 + .../console/common/server/servlet/ErrorPageServlet.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/api/impl/MaintenanceAPIImpl.java b/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/api/impl/MaintenanceAPIImpl.java index 961d5b425c6..dd233debc07 100644 --- a/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/api/impl/MaintenanceAPIImpl.java +++ b/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/api/impl/MaintenanceAPIImpl.java @@ -35,6 +35,7 @@ /** * This API gives access to maintenance administration tasks. */ +@AvailableWhenTenantIsPaused public class MaintenanceAPIImpl implements MaintenanceAPI { public MaintenanceAPIImpl() { diff --git a/bpm/bonita-web-server/src/main/java/org/bonitasoft/console/common/server/servlet/ErrorPageServlet.java b/bpm/bonita-web-server/src/main/java/org/bonitasoft/console/common/server/servlet/ErrorPageServlet.java index c3693d64918..057575157bf 100644 --- a/bpm/bonita-web-server/src/main/java/org/bonitasoft/console/common/server/servlet/ErrorPageServlet.java +++ b/bpm/bonita-web-server/src/main/java/org/bonitasoft/console/common/server/servlet/ErrorPageServlet.java @@ -27,7 +27,6 @@ import org.apache.commons.lang3.StringUtils; import org.bonitasoft.console.common.server.utils.PlatformManagementUtils; import org.bonitasoft.console.common.server.utils.SessionUtil; -import org.bonitasoft.console.common.server.utils.TenantsManagementUtils; import org.bonitasoft.engine.session.APISession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -109,7 +108,7 @@ protected void doGet(final HttpServletRequest request, final HttpServletResponse protected boolean isPlatformHealthy() { try { PlatformManagementUtils platformManagementUtils = new PlatformManagementUtils(); - return platformManagementUtils.isPlatformAvailable() && !TenantsManagementUtils.isDefaultTenantPaused(); + return platformManagementUtils.isPlatformAvailable(); } catch (Exception e) { if (LOGGER.isInfoEnabled()) { LOGGER.info("Platform is not healthy.");