From 632c4c6e2d98207caab9fb06f24368781a216b60 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Sun, 20 Sep 2015 22:24:01 +0200 Subject: [PATCH] IDEMPIERE-2804 Copy role process : using same roles in param --- .../src/org/compiere/process/CopyRole.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyRole.java b/org.adempiere.base.process/src/org/compiere/process/CopyRole.java index 0740242031..4b5ba2d7aa 100755 --- a/org.adempiere.base.process/src/org/compiere/process/CopyRole.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyRole.java @@ -79,6 +79,9 @@ public class CopyRole extends SvrProcess throw new AdempiereException(Msg.getMsg(getCtx(), "CannotAccessProcess", new Object[] {getProcessInfo().getAD_Process_ID(), MRole.getDefault().getName()})); } + if (m_AD_Role_ID_From == m_AD_Role_ID_To) + throw new AdempiereException("Roles must be different"); + String[] tables = new String[] {"AD_Window_Access", "AD_Process_Access", "AD_Form_Access", "AD_Workflow_Access", "AD_Task_Access", "AD_Document_Action_Access", "AD_InfoWindow_Access", I_AD_Role_Included.Table_Name