Multi-environment and multi-user construction

This commit is contained in:
2026-09-15 21:37:58 +03:30
parent e61fad95c6
commit d3f97b9dc4
37 changed files with 1349 additions and 201 deletions
+7 -2
View File
@@ -234,8 +234,13 @@ export class PortalService {
const owner =
(await this.prisma.user.findFirst({
where: {
organizationId: actor.organizationId,
role: { in: ['owner', 'admin', 'support'] },
memberships: {
some: {
organizationId: actor.organizationId,
role: { in: ['owner', 'admin', 'support'] },
isActive: true,
},
},
},
orderBy: { createdAt: 'asc' },
})) ?? null;