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
This commit is contained in:
alphaeusmote
2025-04-10 21:53:02 +00:00
parent 0f1dede691
commit f2b8433331
@@ -65,6 +65,7 @@ interface DynamicGroupRuleWithConnectionIds {
createOUIfNotExists: boolean; createOUIfNotExists: boolean;
createGroupForEachAttributeValue: boolean; createGroupForEachAttributeValue: boolean;
createOUForEachAttributeValue: boolean; createOUForEachAttributeValue: boolean;
autoAddRootDSE: boolean; // Add the new property
connectionIds: number[]; connectionIds: number[];
} }
@@ -91,11 +92,11 @@ export const RuleEditor: React.FC<RuleEditorProps> = ({ rule, onSave, onCancel }
description: rule?.description || '', description: rule?.description || '',
targetGroupName: rule?.targetGroup ? rule?.targetGroup.split(',')[0].replace('CN=', '') : '', targetGroupName: rule?.targetGroup ? rule?.targetGroup.split(',')[0].replace('CN=', '') : '',
targetOU: rule?.targetGroup ? rule?.targetGroup.split(',').slice(1).join(',') : '', targetOU: rule?.targetGroup ? rule?.targetGroup.split(',').slice(1).join(',') : '',
createGroupIfNotExists: rule?.createGroupIfNotExists || false, createGroupIfNotExists: rule?.createGroupIfNotExists ?? true, // Default to true
createOUIfNotExists: rule?.createOUIfNotExists || false, createOUIfNotExists: rule?.createOUIfNotExists ?? true, // Default to true
createGroupForEachAttributeValue: rule?.createGroupForEachAttributeValue || false, createGroupForEachAttributeValue: rule?.createGroupForEachAttributeValue || false,
createOUForEachAttributeValue: rule?.createOUForEachAttributeValue || 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, enabled: rule?.enabled ?? true,
variablePattern: rule?.variablePattern || '', variablePattern: rule?.variablePattern || '',
connections: rule?.connectionIds || [] connections: rule?.connectionIds || []
@@ -282,6 +283,7 @@ export const RuleEditor: React.FC<RuleEditorProps> = ({ rule, onSave, onCancel }
createOUIfNotExists: formData.createOUIfNotExists, createOUIfNotExists: formData.createOUIfNotExists,
createGroupForEachAttributeValue: formData.createGroupForEachAttributeValue, createGroupForEachAttributeValue: formData.createGroupForEachAttributeValue,
createOUForEachAttributeValue: formData.createOUForEachAttributeValue, createOUForEachAttributeValue: formData.createOUForEachAttributeValue,
autoAddRootDSE: formData.autoAddRootDSE, // Add the new property
schedule: rule?.schedule || "0 0 * * *", // Default: daily at midnight schedule: rule?.schedule || "0 0 * * *", // Default: daily at midnight
useAdvancedScheduling: rule?.useAdvancedScheduling || false useAdvancedScheduling: rule?.useAdvancedScheduling || false
}; };
@@ -302,7 +304,8 @@ export const RuleEditor: React.FC<RuleEditorProps> = ({ rule, onSave, onCancel }
createGroupIfNotExists: formData.createGroupIfNotExists, createGroupIfNotExists: formData.createGroupIfNotExists,
createOUIfNotExists: formData.createOUIfNotExists, createOUIfNotExists: formData.createOUIfNotExists,
createGroupForEachAttributeValue: formData.createGroupForEachAttributeValue, createGroupForEachAttributeValue: formData.createGroupForEachAttributeValue,
createOUForEachAttributeValue: formData.createOUForEachAttributeValue createOUForEachAttributeValue: formData.createOUForEachAttributeValue,
autoAddRootDSE: formData.autoAddRootDSE
}, },
conditions conditions
}); });