Update default settings for group and OU creation: Enable "Create Group," "Create OU," and "Root DSE" options by default.

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/35205fbe-afee-4cb7-9e5a-fd8d79862977.jpg
This commit is contained in:
alphaeusmote
2025-04-10 21:53:57 +00:00
2 changed files with 12 additions and 2 deletions
@@ -0,0 +1,9 @@
-- Add autoAddRootDSE column to dynamic_group_rules table
ALTER TABLE dynamic_group_rules ADD COLUMN IF NOT EXISTS auto_add_root_dse BOOLEAN DEFAULT TRUE;
-- Update existing records to set autoAddRootDSE to TRUE for better user experience
UPDATE dynamic_group_rules SET auto_add_root_dse = TRUE WHERE auto_add_root_dse IS NULL;
-- Change the defaults for create_group_if_not_exists and create_ou_if_not_exists to TRUE
ALTER TABLE dynamic_group_rules ALTER COLUMN create_group_if_not_exists SET DEFAULT TRUE;
ALTER TABLE dynamic_group_rules ALTER COLUMN create_ou_if_not_exists SET DEFAULT TRUE;
+3 -2
View File
@@ -201,10 +201,11 @@ export const dynamicGroupRules = pgTable("dynamic_group_rules", {
lastRunStatus: text("last_run_status"),
variablePattern: text("variable_pattern"), // Pattern for dynamic group name, e.g. "{{department}}-Users"
useAdvancedScheduling: boolean("use_advanced_scheduling").default(false),
createGroupIfNotExists: boolean("create_group_if_not_exists").default(false),
createOUIfNotExists: boolean("create_ou_if_not_exists").default(false),
createGroupIfNotExists: boolean("create_group_if_not_exists").default(true), // Changed default to true
createOUIfNotExists: boolean("create_ou_if_not_exists").default(true), // Changed default to true
createGroupForEachAttributeValue: boolean("create_group_for_each_attribute_value").default(false),
createOUForEachAttributeValue: boolean("create_ou_for_each_attribute_value").default(false),
autoAddRootDSE: boolean("auto_add_root_dse").default(true), // Added with default true
});
// Rule conditions (filter logic)