From 2af02d77d41d449e45b5f33706f5d0f6679ae119 Mon Sep 17 00:00:00 2001 From: alphaeusmote <41258468-alphaeusmote@users.noreply.replit.com> Date: Thu, 10 Apr 2025 18:17:40 +0000 Subject: [PATCH] Fix duplicate group names by removing default CN prefix Replit-Commit-Author: Agent Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/11b142bd-a00d-4c8a-b710-2021aa5fe994.jpg --- .../src/components/dynamic-groups/rule-editor.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/client/src/components/dynamic-groups/rule-editor.tsx b/client/src/components/dynamic-groups/rule-editor.tsx index f182b69..9b40567 100644 --- a/client/src/components/dynamic-groups/rule-editor.tsx +++ b/client/src/components/dynamic-groups/rule-editor.tsx @@ -186,7 +186,13 @@ export const RuleEditor: React.FC = ({ rule, onSave, onCancel } // Ensure targetOU has rootDSE const fullOU = ensureRootDSE(formData.targetOU); - return `CN=${formData.targetGroupName},${fullOU}`; + + // Check if the group name already has CN= prefix + const groupName = formData.targetGroupName.startsWith('CN=') + ? formData.targetGroupName + : `CN=${formData.targetGroupName}`; + + return `${groupName},${fullOU}`; }; // Handle form submission @@ -472,15 +478,14 @@ export const RuleEditor: React.FC = ({ rule, onSave, onCancel }
- CN=