mirror of
https://github.com/freedbygrace/ActiveDirectoryManager.git
synced 2026-08-12 19:58:26 +00:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user