fix(groups): unique names, requested changes

This commit is contained in:
Daniel Hougaard
2025-01-16 17:38:54 +01:00
parent 4e68304262
commit ef87086272
5 changed files with 57 additions and 44 deletions
+7 -4
View File
@@ -790,10 +790,13 @@ export const scimServiceFactory = ({
});
const newGroup = await groupDAL.transaction(async (tx) => {
const conflictingGroup = await groupDAL.findOne({
name: displayName,
orgId
});
const conflictingGroup = await groupDAL.findOne(
{
name: displayName,
orgId
},
tx
);
if (conflictingGroup) {
throw new ScimRequestError({