Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gioelecerati committed Nov 9, 2023
1 parent b5c20eb commit fe7f309
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/api/src/middleware/auth.ts
Expand Up @@ -290,15 +290,9 @@ function authorizer(params: AuthzParams): RequestHandler {
);
}

let isTest =
process.env.NODE_ENV === "test" ||
process.env.NODE_ENV === "development" ||
process.env.NODE_ENV === "staging";

const verifyEmail =
req.config.requireEmailVerification &&
!params.allowUnverified &&
!isTest &&
user.createdAt > EMAIL_VERIFICATION_CUTOFF_DATE;
if (verifyEmail && !user.emailValid) {
throw new ForbiddenError(
Expand Down

0 comments on commit fe7f309

Please sign in to comment.