🧑💻 Improve env variables type safety and management (#718)
Closes #679
This commit is contained in:
@@ -14,6 +14,7 @@ import { convertInvitationsToCollaborations } from '@/features/auth/helpers/conv
|
||||
import { getNewUserInvitations } from '@/features/auth/helpers/getNewUserInvitations'
|
||||
import { joinWorkspaces } from '@/features/auth/helpers/joinWorkspaces'
|
||||
import { parseWorkspaceDefaultPlan } from '@/features/workspace/helpers/parseWorkspaceDefaultPlan'
|
||||
import { env } from '@typebot.io/env'
|
||||
|
||||
export function customAdapter(p: PrismaClient): Adapter {
|
||||
return {
|
||||
@@ -26,8 +27,8 @@ export function customAdapter(p: PrismaClient): Adapter {
|
||||
user.email
|
||||
)
|
||||
if (
|
||||
process.env.DISABLE_SIGNUP === 'true' &&
|
||||
process.env.ADMIN_EMAIL !== user.email &&
|
||||
env.DISABLE_SIGNUP &&
|
||||
env.ADMIN_EMAIL !== user.email &&
|
||||
invitations.length === 0 &&
|
||||
workspaceInvitations.length === 0
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user