From f2b843333111424d7f6e2df9009ae39667db14bf Mon Sep 17 00:00:00 2001 From: alphaeusmote <41258468-alphaeusmote@users.noreply.replit.com> Date: Thu, 10 Apr 2025 21:53:02 +0000 Subject: [PATCH] Enable default settings for creating OUs and groups, and root DSE access. 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/7ab3d309-98ea-4be4-9773-9c1c0e503e41.jpg --- client/src/components/dynamic-groups/rule-editor.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/client/src/components/dynamic-groups/rule-editor.tsx b/client/src/components/dynamic-groups/rule-editor.tsx index 0b33d8f..e2ce2ae 100644 --- a/client/src/components/dynamic-groups/rule-editor.tsx +++ b/client/src/components/dynamic-groups/rule-editor.tsx @@ -65,6 +65,7 @@ interface DynamicGroupRuleWithConnectionIds { createOUIfNotExists: boolean; createGroupForEachAttributeValue: boolean; createOUForEachAttributeValue: boolean; + autoAddRootDSE: boolean; // Add the new property connectionIds: number[]; } @@ -91,11 +92,11 @@ export const RuleEditor: React.FC = ({ rule, onSave, onCancel } description: rule?.description || '', targetGroupName: rule?.targetGroup ? rule?.targetGroup.split(',')[0].replace('CN=', '') : '', targetOU: rule?.targetGroup ? rule?.targetGroup.split(',').slice(1).join(',') : '', - createGroupIfNotExists: rule?.createGroupIfNotExists || false, - createOUIfNotExists: rule?.createOUIfNotExists || false, + createGroupIfNotExists: rule?.createGroupIfNotExists ?? true, // Default to true + createOUIfNotExists: rule?.createOUIfNotExists ?? true, // Default to true createGroupForEachAttributeValue: rule?.createGroupForEachAttributeValue || false, createOUForEachAttributeValue: rule?.createOUForEachAttributeValue || false, - autoAddRootDSE: true, // Default to true for better user experience + autoAddRootDSE: rule?.autoAddRootDSE ?? true, // Default to true enabled: rule?.enabled ?? true, variablePattern: rule?.variablePattern || '', connections: rule?.connectionIds || [] @@ -282,6 +283,7 @@ export const RuleEditor: React.FC = ({ rule, onSave, onCancel } createOUIfNotExists: formData.createOUIfNotExists, createGroupForEachAttributeValue: formData.createGroupForEachAttributeValue, createOUForEachAttributeValue: formData.createOUForEachAttributeValue, + autoAddRootDSE: formData.autoAddRootDSE, // Add the new property schedule: rule?.schedule || "0 0 * * *", // Default: daily at midnight useAdvancedScheduling: rule?.useAdvancedScheduling || false }; @@ -302,7 +304,8 @@ export const RuleEditor: React.FC = ({ rule, onSave, onCancel } createGroupIfNotExists: formData.createGroupIfNotExists, createOUIfNotExists: formData.createOUIfNotExists, createGroupForEachAttributeValue: formData.createGroupForEachAttributeValue, - createOUForEachAttributeValue: formData.createOUForEachAttributeValue + createOUForEachAttributeValue: formData.createOUForEachAttributeValue, + autoAddRootDSE: formData.autoAddRootDSE }, conditions });