From 3d5ed93fcea8a44d70aa6d46184fa7a50372cf88 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 21 Jun 2022 15:43:12 -0400 Subject: [PATCH] fix: #671, password reset broken --- demo/server.ts | 1 + src/auth/operations/resetPassword.ts | 10 ---------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/demo/server.ts b/demo/server.ts index 2843074e4e..1f2baacfd3 100644 --- a/demo/server.ts +++ b/demo/server.ts @@ -12,6 +12,7 @@ payload.init({ mongoURL: process.env.MONGO_URL || 'mongodb://localhost/payload', express: expressApp, email: { + logMockCredentials: true, fromName: 'Payload', fromAddress: 'hello@payloadcms.com', }, diff --git a/src/auth/operations/resetPassword.ts b/src/auth/operations/resetPassword.ts index a259c9d651..7bbe9c645b 100644 --- a/src/auth/operations/resetPassword.ts +++ b/src/auth/operations/resetPassword.ts @@ -6,7 +6,6 @@ import getCookieExpiration from '../../utilities/getCookieExpiration'; import { UserDocument } from '../types'; import { fieldAffectsData } from '../../fields/config/types'; import { PayloadRequest } from '../../express/types'; -import executeAccess from '../executeAccess'; export type Result = { token: string @@ -42,19 +41,10 @@ async function resetPassword(args: Arguments): Promise { }, payload, }, - req, overrideAccess, data, } = args; - // ///////////////////////////////////// - // Access - // ///////////////////////////////////// - - if (!overrideAccess) { - await executeAccess({ req }, collectionConfig.access.unlock); - } - // ///////////////////////////////////// // Reset Password // /////////////////////////////////////