From 165229d2db38091bfac39b8f9168dc88ae4cac4a Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 13 Aug 2022 04:15:31 +0200 Subject: [PATCH] IDEMPIERE-5380 StackOverflowError when try to login in application with substitute user (FHCA-3828) (#1437) --- org.adempiere.base/src/org/compiere/model/MRole.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MRole.java b/org.adempiere.base/src/org/compiere/model/MRole.java index c004383bd9..e4461b44b9 100644 --- a/org.adempiere.base/src/org/compiere/model/MRole.java +++ b/org.adempiere.base/src/org/compiere/model/MRole.java @@ -2897,9 +2897,9 @@ public final class MRole extends X_AD_Role implements ImmutablePOSupport */ private void loadSubstitutedRoles(boolean reload) { - if (this.m_parent != null) + if (this.m_parent != null || isMasterRole()) { - // load only if this is logged role (no parent roles) + // load only if this is logged role (no parent or master roles) return; } //