mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-25 11:05:07 +02:00
Fix password bugs (#2235)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
+14
-1
@@ -23,9 +23,10 @@ import {
|
||||
dropWorkspace,
|
||||
getAccount,
|
||||
getWorkspace,
|
||||
setRole,
|
||||
listAccounts,
|
||||
listWorkspaces,
|
||||
replacePassword,
|
||||
setRole,
|
||||
upgradeWorkspace
|
||||
} from '@anticrm/account'
|
||||
import { setMetadata } from '@anticrm/platform'
|
||||
@@ -94,6 +95,18 @@ program
|
||||
})
|
||||
})
|
||||
|
||||
program
|
||||
.command('reset-account <email>')
|
||||
.description('create user and corresponding account in master database')
|
||||
.option('-p, --password <password>', 'new user password')
|
||||
.action(async (email: string, cmd) => {
|
||||
const { mongodbUri } = prepareTools()
|
||||
return await withDatabase(mongodbUri, async (db) => {
|
||||
console.log(`update account ${email} ${cmd.first as string} ${cmd.last as string}...`)
|
||||
await replacePassword(db, email, cmd.password)
|
||||
})
|
||||
})
|
||||
|
||||
program
|
||||
.command('assign-workspace <email> <workspace>')
|
||||
.description('assign workspace')
|
||||
|
||||
Reference in New Issue
Block a user