mirror of
https://github.com/gnmyt/LicenseAPI.git
synced 2026-01-13 03:31:45 +00:00
Remove plan limitations entirely
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import { checkProjectAccess } from "@controller/projects";
|
||||
import { IKeyRole } from "@models/AccessKey";
|
||||
import { Group, IGroup } from "@models/Group";
|
||||
import { planLimits } from "../limits/plans";
|
||||
import { Permission } from "@models/Permission";
|
||||
import { convertIdsToPermissions } from "@controller/permission";
|
||||
|
||||
@ -36,9 +35,6 @@ export const createGroup = async (userId: string, projectId: string, configurati
|
||||
const access = await checkProjectAccess(IKeyRole.MANAGE)(userId, projectId);
|
||||
if ("code" in access) return access;
|
||||
|
||||
const count = await Group.countDocuments({ projectId: String(access._id) });
|
||||
if (count >= planLimits[access.plan].GROUPS) return { code: 95, message: "You have exceeded the group limit" };
|
||||
|
||||
const group = await Group.findOne({ projectId: String(access._id), name: configuration.name });
|
||||
if (group !== null) return { code: 4008, message: "The provided group name is already in use" };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user