Improve dynamic group rule creation by adding automatic rootDSE determination and OU path formatting.

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/fee7a967-c8c4-4cee-9e90-6b35fc23141b.jpg
This commit is contained in:
alphaeusmote
2025-04-10 16:15:30 +00:00
parent 124c22a488
commit 2071248d7f
2 changed files with 66 additions and 5 deletions
@@ -381,12 +381,16 @@ export const RuleEditor: React.FC<RuleEditorProps> = ({ rule, onSave, onCancel }
<div className="absolute right-1 top-1">
<VariableSelector
onSelectVariable={(variable) => {
const variableText = `{${variable}}`;
// Direct insertion of variable or prefixed OU segment
const currentValue = formData.targetOU || '';
const newValue = currentValue + variableText;
// Check if this is a variable or a direct DC value
const newValue = variable.startsWith("DC=") || variable.startsWith("OU=")
? (currentValue && !currentValue.endsWith(",") ? currentValue + "," : currentValue) + variable
: currentValue + variable;
setFormData({ ...formData, targetOU: newValue });
}}
connections={formData.connections}
isForOU={true}
/>
</div>
</div>