IDEMPIERE-4268 Web Services : Read miss cross-tenant check (#442)

Problem when creating a preference with SuperUser in System, and then trying to save the same preference in GardenWorld (for example changing the height of a window)
This commit is contained in:
Carlos Ruiz 2020-12-07 16:00:14 +01:00 committed by GitHub
parent 416d92a292
commit d7bac68f94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -1336,6 +1336,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
int userId = Env.getAD_User_ID(Env.getCtx());
MPreference preference = query.setOnlyActiveRecords(true)
.setApplyAccessFilter(true)
.setClient_ID()
.setParameters(windowId, adTabId+"|DetailPane.IsOpen", userId)
.first();
if (preference == null || preference.getAD_Preference_ID() <= 0) {
@ -2035,6 +2036,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
int userId = Env.getAD_User_ID(Env.getCtx());
MPreference preference = query.setOnlyActiveRecords(true)
.setApplyAccessFilter(true)
.setClient_ID()
.setParameters(windowId, adTabId+"|"+attribute, userId)
.first();
if (preference == null || preference.getAD_Preference_ID() <= 0) {

View File

@ -463,6 +463,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
int userId = Env.getAD_User_ID(Env.getCtx());
MPreference preference = query.setOnlyActiveRecords(true)
.setApplyAccessFilter(true)
.setClient_ID()
.setParameters("SideController.Width", userId)
.first();
@ -506,6 +507,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
int userId = Env.getAD_User_ID(Env.getCtx());
MPreference preference = query.setOnlyActiveRecords(true)
.setApplyAccessFilter(true)
.setClient_ID()
.setParameters("HelpController.Width", userId)
.first();