IDEMPIERE-2483 Users can report on windows where they don't have access / fix error reported by hieplq
This commit is contained in:
parent
2c3aacec90
commit
980f34a564
|
@ -677,9 +677,17 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
||||||
if (isZoom) {
|
if (isZoom) {
|
||||||
// check permission on the zoomed window
|
// check permission on the zoomed window
|
||||||
MTable mTable = MTable.get(getCtx(), pde.getForeignColumnName().substring(0, pde.getForeignColumnName().length()-3));
|
MTable mTable = MTable.get(getCtx(), pde.getForeignColumnName().substring(0, pde.getForeignColumnName().length()-3));
|
||||||
int Record_ID = Integer.parseInt(pde.getValueAsString());
|
int Record_ID = -1;
|
||||||
int AD_Window_ID = Env.getZoomWindowID(mTable.get_ID(), Record_ID);
|
try {
|
||||||
Boolean canAccess = MRole.getDefault().getWindowAccess(AD_Window_ID);
|
Record_ID = Integer.parseInt(pde.getValueAsString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
Record_ID = -1;
|
||||||
|
}
|
||||||
|
Boolean canAccess = null;
|
||||||
|
if (Record_ID >= 0) {
|
||||||
|
int AD_Window_ID = Env.getZoomWindowID(mTable.get_ID(), Record_ID);
|
||||||
|
canAccess = MRole.getDefault().getWindowAccess(AD_Window_ID);
|
||||||
|
}
|
||||||
if (canAccess == null) {
|
if (canAccess == null) {
|
||||||
isZoom = false;
|
isZoom = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue