Multi-environment and multi-user construction
This commit is contained in:
@@ -432,7 +432,7 @@ export class TicketsService {
|
||||
|
||||
private async assertUser(organizationId: string, userId: string) {
|
||||
const user = await this.prisma.user.findFirst({
|
||||
where: { id: userId, organizationId },
|
||||
where: { id: userId, memberships: { some: { organizationId } } },
|
||||
select: { id: true },
|
||||
});
|
||||
if (!user) throw new BadRequestException('کاربر مسئول معتبر نیست');
|
||||
|
||||
Reference in New Issue
Block a user