Make sure to delete SSO ID doc as well (#14307)
This commit is contained in:
parent
374a1ba871
commit
f07ebc18db
|
@ -48,10 +48,13 @@ async function removeTenantUsers(tenantId: string) {
|
||||||
try {
|
try {
|
||||||
const allUsers = await getTenantUsers(tenantId)
|
const allUsers = await getTenantUsers(tenantId)
|
||||||
const allEmails = allUsers.rows.map((row: any) => row.doc.email)
|
const allEmails = allUsers.rows.map((row: any) => row.doc.email)
|
||||||
|
const allSsoIds = allUsers.rows
|
||||||
|
.map((row: any) => row.doc.ssoId)
|
||||||
|
.filter(id => !!id)
|
||||||
|
|
||||||
// get the id and email doc ids
|
// get the id and email doc ids
|
||||||
let keys = allUsers.rows.map((row: any) => row.id)
|
let keys = allUsers.rows.map((row: any) => row.id)
|
||||||
keys = keys.concat(allEmails)
|
keys = keys.concat(allEmails).concat(allSsoIds)
|
||||||
|
|
||||||
const platformDb = platform.getPlatformDB()
|
const platformDb = platform.getPlatformDB()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue