IDEMPIERE-3725 Unposted document window takes a long time to load (AP2-238)

This commit is contained in:
Carlos Ruiz 2018-06-02 00:17:20 +02:00
parent d082d6c9f8
commit 81b55cbdf1
1 changed files with 3 additions and 2 deletions

View File

@ -699,8 +699,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
.append(mTab.getTableName());
if (where.length() > 0)
sql.append(" WHERE ").append(where);
// Does not consider security
int no = DB.getSQLValue(null, sql.toString());
String finalSQL = MRole.getDefault().addAccessSQL(sql.toString(),
mTab.getTableName(), MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
int no = DB.getSQLValue(null, finalSQL.toString());
//
require = MRole.getDefault().isQueryRequire(no);
}