IDEMPIERE-5369 - Dashboard Cross Tenant Check (#1425)
This commit is contained in:
parent
ce22d1cc51
commit
ab78a8acbd
|
@ -62,6 +62,7 @@ import org.compiere.model.MPInstancePara;
|
|||
import org.compiere.model.MProcess;
|
||||
import org.compiere.model.MProcessPara;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.print.ReportEngine;
|
||||
import org.compiere.process.ProcessInfo;
|
||||
import org.compiere.tools.FileUtil;
|
||||
|
@ -661,8 +662,13 @@ public class DashboardController implements EventListener<Event> {
|
|||
int PA_DashboardPreference_ID = Integer.parseInt(value.toString());
|
||||
MDashboardPreference preference = new MDashboardPreference(Env.getCtx(), PA_DashboardPreference_ID, null);
|
||||
preference.setIsCollapsedByDefault(!panel.isOpen());
|
||||
if (!preference.save())
|
||||
logger.log(Level.SEVERE, "Failed to save dashboard preference " + preference.toString());
|
||||
try {
|
||||
PO.setCrossTenantSafe();
|
||||
if (!preference.save())
|
||||
logger.log(Level.SEVERE, "Failed to save dashboard preference " + preference.toString());
|
||||
} finally {
|
||||
PO.clearCrossTenantSafe();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue