chore: update add members to team (#25685)

This commit is contained in:
Morgan authored and GitHub committed 2025-12-08 03:48:15 +00:00
1 parent 1182460d5c
commit 9631d0a64b
2 files changed
+27

No files matched your search

@@ -588,4 +588,15 @@ export class TeamRepository {
const action = permission.substring(lastDotIndex + 1);
return { resource, action };
}
async findTeamsNotBelongingToOrgByIds({ teamIds, orgId }: { teamIds: number[]; orgId: number }) {
return await this.prismaClient.team.findMany({
where: {
id: { in: teamIds },
NOT: {
parentId: orgId, // Finds any team whose orgId is NOT the target ID
},
},
});
}
}