Skip to content

Commit

Permalink
fix(maintenance mode): Redirect to UID error pages even in maintenanc…
Browse files Browse the repository at this point in the history
…e (#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 <bonita-ci@bonitasoft.com>
  • Loading branch information
abirembaut and bonita-ci authored Sep 13, 2023
1 parent b506768 commit f226ef2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
/**
* This API gives access to maintenance administration tasks.
*/
@AvailableWhenTenantIsPaused
public class MaintenanceAPIImpl implements MaintenanceAPI {

public MaintenanceAPIImpl() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.");
Expand Down

0 comments on commit f226ef2

Please sign in to comment.