chore: update add members to team (#25685)
This commit is contained in:
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
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user