mirror of
https://github.com/hcengineering/platform.git
synced 2026-10-01 05:55:09 +02:00
Readonly allow signup (#9517)
Signed-off-by: Anton Alexeyev <alexeyev.anton@gmail.com>
This commit is contained in:
@@ -19,7 +19,8 @@
|
||||
AccountUuid,
|
||||
Configuration,
|
||||
getCurrentAccount,
|
||||
pickPrimarySocialId
|
||||
pickPrimarySocialId,
|
||||
readOnlyGuestAccountUuid
|
||||
} from '@hcengineering/core'
|
||||
import {
|
||||
Breadcrumb,
|
||||
@@ -49,7 +50,7 @@
|
||||
import { translateCB } from '@hcengineering/platform'
|
||||
import { createQuery, getClient, MessageBox, uiContext } from '@hcengineering/presentation'
|
||||
import { WorkspaceSetting } from '@hcengineering/setting'
|
||||
import { AvatarType, ensureEmployeeForPerson } from '@hcengineering/contact'
|
||||
import contact, { AvatarType, ensureEmployeeForPerson } from '@hcengineering/contact'
|
||||
import settingsRes from '../plugin'
|
||||
|
||||
let loading = true
|
||||
@@ -172,6 +173,11 @@
|
||||
guestUserInfo.guestSocialIds,
|
||||
guestUserInfo.guestPerson
|
||||
)
|
||||
} else {
|
||||
const readonlyEmployee = await client.findOne(contact.mixin.Employee, { personUuid: readOnlyGuestAccountUuid })
|
||||
if (readonlyEmployee !== undefined) {
|
||||
await client.update(readonlyEmployee, { active: false })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user