Multi-environment and multi-user construction
This commit is contained in:
@@ -425,7 +425,10 @@ export class SalesService {
|
||||
return null;
|
||||
}
|
||||
const user = await this.prisma.user.findFirst({
|
||||
where: { id: requested, organizationId: actor.organizationId },
|
||||
where: {
|
||||
id: requested,
|
||||
memberships: { some: { organizationId: actor.organizationId } },
|
||||
},
|
||||
select: { id: true },
|
||||
});
|
||||
if (!user) throw new BadRequestException('کاربر هدف معتبر نیست');
|
||||
|
||||
Reference in New Issue
Block a user