Removed todo from the permission.ts

This commit is contained in:
2023-08-03 23:55:59 +02:00
parent ae1ba7c10d
commit 079202205e

View File

@ -53,8 +53,6 @@ export const deletePermission = async (userId: string, projectId: string, permis
const permission = await Permission.findOne({ projectId: encryptClearField(String(access._id)), permission: encryptClearField(permissionName) });
if (permission === null) return { code: 4009, message: "The provided permission does not exist" };
// TODO: Delete permission in license & groups
await permission.deleteOne();
}
@ -62,8 +60,6 @@ export const updatePermission = async (userId: string, projectId: string, permis
const access = await checkProjectAccess(IKeyRole.MANAGE)(userId, projectId);
if ("code" in access) return access;
// TODO: (if name) Update permission in license & groups
const permission = await Permission.findOne({ projectId: encryptClearField(String(access._id)), permission: encryptClearField(permissionName) });
if (permission === null) return { code: 4009, message: "The provided permission does not exist" };