IDEMPIERE-5849:MRole.getDefault make phantom role on cache (#2020)
patch from Heng Sin Co-authored-by: hengsin <hengsin@gmail.com>
This commit is contained in:
parent
3992f46b04
commit
d28c6eb9d8
|
@ -88,6 +88,9 @@ public final class MRole extends X_AD_Role implements ImmutablePOSupport
|
||||||
*/
|
*/
|
||||||
public static MRole getDefault (Properties ctx, boolean reload)
|
public static MRole getDefault (Properties ctx, boolean reload)
|
||||||
{
|
{
|
||||||
|
if (Util.isEmpty(Env.getContext(ctx, Env.AD_ROLE_ID)) || Util.isEmpty(Env.getContext(ctx, Env.AD_USER_ID)))
|
||||||
|
return null;
|
||||||
|
|
||||||
int AD_Role_ID = Env.getContextAsInt(ctx, Env.AD_ROLE_ID);
|
int AD_Role_ID = Env.getContextAsInt(ctx, Env.AD_ROLE_ID);
|
||||||
int AD_User_ID = Env.getContextAsInt(ctx, Env.AD_USER_ID);
|
int AD_User_ID = Env.getContextAsInt(ctx, Env.AD_USER_ID);
|
||||||
|
|
||||||
|
|
|
@ -917,7 +917,8 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
|
||||||
* @return true if preference dialog is available and accessible
|
* @return true if preference dialog is available and accessible
|
||||||
*/
|
*/
|
||||||
protected boolean isShowPreference() {
|
protected boolean isShowPreference() {
|
||||||
return MRole.getDefault().isShowPreference() && gridField != null && !gridField.isEncrypted() && !gridField.isEncryptedColumn() && !gridField.isVirtualColumn();
|
return MRole.getDefault() != null && MRole.getDefault().isShowPreference() && gridField != null && !gridField.isEncrypted()
|
||||||
|
&& !gridField.isEncryptedColumn() && !gridField.isVirtualColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue