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=