mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-11 01:40:32 +00:00
UBERF-9714: Support subsecutive meeting joins (#8421)
* uberf-9714: support subsecutive meeting joins Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com> * uberf-9714: fix unit test Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
addd09cc52
commit
0341b69395
@ -244,6 +244,7 @@ describe('AccountPostgresDbCollection', () => {
|
||||
a.uuid,
|
||||
a.timezone,
|
||||
a.locale,
|
||||
a.automatic,
|
||||
p.hash,
|
||||
p.salt
|
||||
FROM global_account.account as a
|
||||
|
@ -316,6 +316,7 @@ export class AccountPostgresDbCollection
|
||||
a.uuid,
|
||||
a.timezone,
|
||||
a.locale,
|
||||
a.automatic,
|
||||
p.hash,
|
||||
p.salt
|
||||
FROM ${this.getTableName()} as a
|
||||
|
@ -766,27 +766,29 @@ export async function checkAutoJoin (
|
||||
if (emailSocialId != null) {
|
||||
const targetAccount = await getAccount(db, emailSocialId.personUuid)
|
||||
if (targetAccount != null) {
|
||||
if (token == null) {
|
||||
// Login required
|
||||
const person = await db.person.findOne({ uuid: targetAccount.uuid })
|
||||
if (targetAccount.automatic == null || !targetAccount.automatic) {
|
||||
if (token == null) {
|
||||
// Login required
|
||||
const person = await db.person.findOne({ uuid: targetAccount.uuid })
|
||||
|
||||
return {
|
||||
workspace: workspace.uuid,
|
||||
name: person == null ? '' : getPersonName(person),
|
||||
email: normalizedEmail
|
||||
return {
|
||||
workspace: workspace.uuid,
|
||||
name: person == null ? '' : getPersonName(person),
|
||||
email: normalizedEmail
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const { account: callerAccount } = decodeTokenVerbose(ctx, token)
|
||||
const { account: callerAccount } = decodeTokenVerbose(ctx, token)
|
||||
|
||||
if (callerAccount !== targetAccount.uuid) {
|
||||
// Login with target email required
|
||||
const person = await db.person.findOne({ uuid: targetAccount.uuid })
|
||||
if (callerAccount !== targetAccount.uuid) {
|
||||
// Login with target email required
|
||||
const person = await db.person.findOne({ uuid: targetAccount.uuid })
|
||||
|
||||
return {
|
||||
workspace: workspace.uuid,
|
||||
name: person == null ? '' : getPersonName(person),
|
||||
email: normalizedEmail
|
||||
return {
|
||||
workspace: workspace.uuid,
|
||||
name: person == null ? '' : getPersonName(person),
|
||||
email: normalizedEmail
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user