PR comments.
This commit is contained in:
parent
f2f16cfcee
commit
b4b8e16f22
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2,5 +2,5 @@ export interface SaveUserOpts {
|
|||
hashPassword?: boolean
|
||||
requirePassword?: boolean
|
||||
currentUserId?: string
|
||||
noPasswordValidation?: boolean
|
||||
skipPasswordValidation?: boolean
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue