@ -173,7 +173,12 @@ export const getAuthOptions = ({
|
|||||||
if (disposableEmailDomains.includes(user.email.split('@')[1]))
|
if (disposableEmailDomains.includes(user.email.split('@')[1]))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (env.DISABLE_SIGNUP && isNewUser && user.email) {
|
if (
|
||||||
|
env.DISABLE_SIGNUP &&
|
||||||
|
isNewUser &&
|
||||||
|
user.email &&
|
||||||
|
!env.ADMIN_EMAIL?.includes(user.email)
|
||||||
|
) {
|
||||||
const { invitations, workspaceInvitations } =
|
const { invitations, workspaceInvitations } =
|
||||||
await getNewUserInvitations(prisma, user.email)
|
await getNewUserInvitations(prisma, user.email)
|
||||||
if (invitations.length === 0 && workspaceInvitations.length === 0)
|
if (invitations.length === 0 && workspaceInvitations.length === 0)
|
||||||
|
Reference in New Issue
Block a user