When adding a user through the basic onboarding flow they get a temporary password, but we didn't set force password reset, meaning the user wouldn't necessarily have to change the temp password.
This commit is contained in:
parent
4794a5374e
commit
47ebc393c7
|
@ -16,7 +16,13 @@
|
|||
admin = false
|
||||
|
||||
async function createUser() {
|
||||
const res = await users.create({ email: $email, password, builder, admin })
|
||||
const res = await users.create({
|
||||
email: $email,
|
||||
password,
|
||||
builder,
|
||||
admin,
|
||||
forceResetPassword: true,
|
||||
})
|
||||
if (res.status) {
|
||||
notifications.error(res.message)
|
||||
} else {
|
||||
|
|
|
@ -35,12 +35,21 @@ export function createUsersStore() {
|
|||
return await response.json()
|
||||
}
|
||||
|
||||
async function create({ email, password, admin, builder }) {
|
||||
async function create({
|
||||
email,
|
||||
password,
|
||||
admin,
|
||||
builder,
|
||||
forceResetPassword,
|
||||
}) {
|
||||
const body = {
|
||||
email,
|
||||
password,
|
||||
roles: {},
|
||||
}
|
||||
if (forceResetPassword) {
|
||||
body.forceResetPassword = forceResetPassword
|
||||
}
|
||||
if (builder) {
|
||||
body.builder = { global: true }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue