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 }