From b4b8e16f22fb968cc17fc4cdabaac766a8225d2c Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 5 Jan 2024 13:58:31 +0000 Subject: [PATCH] PR comments. --- packages/backend-core/src/users/db.ts | 6 +++--- packages/server/src/startup.ts | 2 +- packages/types/src/sdk/user.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/backend-core/src/users/db.ts b/packages/backend-core/src/users/db.ts index 6d2e476707..4d0d216603 100644 --- a/packages/backend-core/src/users/db.ts +++ b/packages/backend-core/src/users/db.ts @@ -48,7 +48,7 @@ type CreateAdminUserOpts = { ssoId?: string hashPassword?: boolean requirePassword?: boolean - noPasswordValidation?: boolean + skipPasswordValidation?: boolean } type FeatureFns = { isSSOEnforced: FeatureFn; isAppBuildersEnabled: FeatureFn } @@ -118,7 +118,7 @@ export class UserDB { throw new HTTPError("Password change is disabled for this user", 400) } - if (!opts.noPasswordValidation) { + if (!opts.skipPasswordValidation) { const passwordValidation = validatePassword(password) if (!passwordValidation.valid) { throw new HTTPError(passwordValidation.error, 400) @@ -521,7 +521,7 @@ export class UserDB { return await UserDB.save(user, { hashPassword: opts?.hashPassword, requirePassword: opts?.requirePassword, - noPasswordValidation: opts?.noPasswordValidation, + skipPasswordValidation: opts?.skipPasswordValidation, }) } diff --git a/packages/server/src/startup.ts b/packages/server/src/startup.ts index 880bf7a894..f9b5974eb2 100644 --- a/packages/server/src/startup.ts +++ b/packages/server/src/startup.ts @@ -141,7 +141,7 @@ export async function startup(app?: Koa, server?: Server) { { hashPassword: true, requirePassword: true, - noPasswordValidation: true, + skipPasswordValidation: true, } ) // Need to set up an API key for automated integration tests diff --git a/packages/types/src/sdk/user.ts b/packages/types/src/sdk/user.ts index fb2e32c811..3f6f69d2d1 100644 --- a/packages/types/src/sdk/user.ts +++ b/packages/types/src/sdk/user.ts @@ -2,5 +2,5 @@ export interface SaveUserOpts { hashPassword?: boolean requirePassword?: boolean currentUserId?: string - noPasswordValidation?: boolean + skipPasswordValidation?: boolean }