From 33efad6e9a96056e6880c3976f50b62ecefc65a6 Mon Sep 17 00:00:00 2001 From: alphaeusmote <41258468-alphaeusmote@users.noreply.replit.com> Date: Fri, 11 Apr 2025 16:08:07 +0000 Subject: [PATCH] Remove group management functionality from in-memory storage Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/3cf5647d-2f2f-4d1b-938c-8f7e41885e5d.jpg --- server/storage.ts | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/server/storage.ts b/server/storage.ts index 3924dd4..aabf0dd 100644 --- a/server/storage.ts +++ b/server/storage.ts @@ -130,8 +130,7 @@ export class MemStorage implements IStorage { this.webhooksMap = new Map(); this.webhookDeliveryLogsMap = new Map(); this.metricsMap = new Map(); - this.groupsMap = new Map(); - this.groupMembersMap = new Map(); + // Group maps initialization has been removed this.userIdCounter = 1; this.orgIdCounter = 1; @@ -143,8 +142,7 @@ export class MemStorage implements IStorage { this.webhookIdCounter = 1; this.webhookDeliveryLogIdCounter = 1; this.metricIdCounter = 1; - this.groupIdCounter = 1; - this.groupMemberIdCounter = 1; + // Group counter initialization has been removed // Session store is created in the DatabaseStorage class this.sessionStore = null; @@ -190,40 +188,7 @@ export class MemStorage implements IStorage { this.userIdCounter = 2; // Ensure the next ID is after our fixed one } - // Create sample groups - const adminGroup: InsertGroup = { - name: "Administrators", - description: "Group for administrators with full system access", - isActive: true, - createdBy: adminUser.id, - parentGroupId: null - }; - const adminsGroup = this.createGroup(adminGroup); - - const dnsManagersGroup: InsertGroup = { - name: "DNS Managers", - description: "Group for users who can manage DNS records", - isActive: true, - createdBy: adminUser.id, - parentGroupId: null - }; - const dnsGroup = this.createGroup(dnsManagersGroup); - - // Add the admin user to the administrators group - this.addGroupMember({ - groupId: adminsGroup.id, - memberId: adminUser.id, - memberType: "user", - addedBy: adminUser.id - }); - - // Add the organization to the DNS managers group - this.addGroupMember({ - groupId: dnsGroup.id, - memberId: organization.id, - memberType: "organization", - addedBy: adminUser.id - }); + // Group creation and membership code has been removed } // Users