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
@@ -80,10 +80,8 @@ export const groupProjectServiceFactory = ({
});
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Create, ProjectPermissionSub.Groups);
const isUuid = isUuidV4(groupIdOrName);
let group: TGroups | null = null;
if (isUuid) {
if (isUuidV4(groupIdOrName)) {
group = await groupDAL.findOne({ orgId: actorOrgId, id: groupIdOrName });
}
if (!group) {