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
This commit is contained in:
alphaeusmote
2025-04-11 16:08:07 +00:00
parent ac6e5f7941
commit 33efad6e9a
+3 -38
View File
@@ -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