diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 22635dc98d..010d9d49ed 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -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); }