IDEMPIERE-5174 Disable System User - Set new System (#1769)

This commit is contained in:
Carlos Ruiz 2023-04-04 05:36:30 +02:00 committed by GitHub
parent 24ee2a1a3f
commit 9e18bc725e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -47,6 +47,7 @@ import org.apache.ecs.xhtml.tr;
import org.compiere.Adempiere;
import org.compiere.model.MClient;
import org.compiere.model.MSystem;
import org.compiere.model.SystemIDs;
/**
* Web Environment and debugging
@ -150,7 +151,7 @@ public class WebEnv
Properties ctx = new Properties();
Env.setContext(ctx, Env.AD_CLIENT_ID, 0);
Env.setContext(ctx, Env.AD_USER_ID, 0);
Env.setContext(ctx, Env.AD_USER_ID, SystemIDs.USER_SYSTEM);
ServerContext.setCurrentInstance(ctx);
// Load Environment Variables (serverApps/src/web/WEB-INF/web.xml)

View File

@ -74,6 +74,7 @@ import org.compiere.model.MSession;
import org.compiere.model.MSysConfig;
import org.compiere.model.MSystem;
import org.compiere.model.Query;
import org.compiere.model.SystemIDs;
import org.compiere.server.AdempiereServerGroup;
import org.compiere.server.AdempiereServerMgr;
import org.compiere.server.IServerManager;
@ -1344,7 +1345,7 @@ public class AdempiereMonitor extends HttpServlet
try {
Properties ctx = new Properties();
Env.setContext(ctx, Env.AD_CLIENT_ID, 0);
Env.setContext(ctx, Env.AD_USER_ID, 0);
Env.setContext(ctx, Env.AD_USER_ID, SystemIDs.USER_SYSTEM);
ServerContext.setCurrentInstance(ctx);
int maxSecondsToWait = MSysConfig.getIntValue(MSysConfig.MONITOR_MAX_WAIT_FOR_CLUSTER_IN_SECONDS, 180);