BF [2905222] - Find and FindWinow do not handle encrypted columns
http://sourceforge.net/tracker/?func=detail&atid=879334&aid=2905222&group_id=176962
This commit is contained in:
parent
d54fe59e0a
commit
53dc577171
|
|
@ -72,6 +72,7 @@ import org.compiere.util.DB;
|
||||||
import org.compiere.util.DisplayType;
|
import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
import org.compiere.util.SecureEngine;
|
||||||
import org.compiere.util.ValueNamePair;
|
import org.compiere.util.ValueNamePair;
|
||||||
import org.zkoss.zk.au.out.AuFocus;
|
import org.zkoss.zk.au.out.AuFocus;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
|
|
@ -1310,6 +1311,11 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe
|
||||||
// globalqss - Carlos Ruiz - 20060711
|
// globalqss - Carlos Ruiz - 20060711
|
||||||
// fix a bug with virtualColumn + isSelectionColumn not yielding results
|
// fix a bug with virtualColumn + isSelectionColumn not yielding results
|
||||||
GridField field = getTargetMField(ColumnName);
|
GridField field = getTargetMField(ColumnName);
|
||||||
|
// add encryption here if the field is encrypted.
|
||||||
|
if (field.isEncryptedColumn()) {
|
||||||
|
value = SecureEngine.encrypt(value);
|
||||||
|
}
|
||||||
|
|
||||||
boolean isProductCategoryField = isProductCategoryField(field.getAD_Column_ID());
|
boolean isProductCategoryField = isProductCategoryField(field.getAD_Column_ID());
|
||||||
String ColumnSQL = field.getColumnSQL(false);
|
String ColumnSQL = field.getColumnSQL(false);
|
||||||
if (value.toString().indexOf('%') != -1)
|
if (value.toString().indexOf('%') != -1)
|
||||||
|
|
@ -1407,6 +1413,10 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe
|
||||||
Object parsedValue = parseValue(field, value);
|
Object parsedValue = parseValue(field, value);
|
||||||
if (parsedValue == null)
|
if (parsedValue == null)
|
||||||
continue;
|
continue;
|
||||||
|
//encrypt the value if we are searching an encrypted column.
|
||||||
|
if (field.isEncryptedColumn()) {
|
||||||
|
value = SecureEngine.encrypt(value);
|
||||||
|
}
|
||||||
String infoDisplay = value.toString();
|
String infoDisplay = value.toString();
|
||||||
if (field.isLookup())
|
if (field.isLookup())
|
||||||
infoDisplay = field.getLookup().getDisplay(value);
|
infoDisplay = field.getLookup().getDisplay(value);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue