1
0
Fork 0
mirror of synced 2024-09-20 03:08:18 +12:00

Make sure to delete SSO ID doc as well (#14307)

This commit is contained in:
melohagan 2024-08-05 12:54:36 +01:00 committed by GitHub
parent 374a1ba871
commit f07ebc18db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,10 +48,13 @@ async function removeTenantUsers(tenantId: string) {
try {
const allUsers = await getTenantUsers(tenantId)
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
let keys = allUsers.rows.map((row: any) => row.id)
keys = keys.concat(allEmails)
keys = keys.concat(allEmails).concat(allSsoIds)
const platformDb = platform.getPlatformDB()