WIP: add user role check optimization to user principal check, update type comparisons

This commit is contained in:
Danny Avila 2025-08-03 21:53:06 -04:00
parent 89f0a4e02f
commit ecd7bf0d51
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
19 changed files with 481 additions and 71 deletions

View file

@ -334,10 +334,8 @@ describe('Prompt ACL Permissions', () => {
productionId: new ObjectId(),
});
// Add editor to the editors group
await Group.findByIdAndUpdate(testGroups.editors._id, {
$push: { memberIds: testUsers.editor._id },
});
const { addUserToGroup } = require('~/models');
await addUserToGroup(testUsers.editor._id, testGroups.editors._id);
const prompt = await promptFns.savePrompt({
author: testUsers.owner._id,