mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-11 18:01:59 +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.uuid,
|
||||||
a.timezone,
|
a.timezone,
|
||||||
a.locale,
|
a.locale,
|
||||||
|
a.automatic,
|
||||||
p.hash,
|
p.hash,
|
||||||
p.salt
|
p.salt
|
||||||
FROM global_account.account as a
|
FROM global_account.account as a
|
||||||
|
@ -316,6 +316,7 @@ export class AccountPostgresDbCollection
|
|||||||
a.uuid,
|
a.uuid,
|
||||||
a.timezone,
|
a.timezone,
|
||||||
a.locale,
|
a.locale,
|
||||||
|
a.automatic,
|
||||||
p.hash,
|
p.hash,
|
||||||
p.salt
|
p.salt
|
||||||
FROM ${this.getTableName()} as a
|
FROM ${this.getTableName()} as a
|
||||||
|
@ -766,27 +766,29 @@ export async function checkAutoJoin (
|
|||||||
if (emailSocialId != null) {
|
if (emailSocialId != null) {
|
||||||
const targetAccount = await getAccount(db, emailSocialId.personUuid)
|
const targetAccount = await getAccount(db, emailSocialId.personUuid)
|
||||||
if (targetAccount != null) {
|
if (targetAccount != null) {
|
||||||
if (token == null) {
|
if (targetAccount.automatic == null || !targetAccount.automatic) {
|
||||||
// Login required
|
if (token == null) {
|
||||||
const person = await db.person.findOne({ uuid: targetAccount.uuid })
|
// Login required
|
||||||
|
const person = await db.person.findOne({ uuid: targetAccount.uuid })
|
||||||
|
|
||||||
return {
|
return {
|
||||||
workspace: workspace.uuid,
|
workspace: workspace.uuid,
|
||||||
name: person == null ? '' : getPersonName(person),
|
name: person == null ? '' : getPersonName(person),
|
||||||
email: normalizedEmail
|
email: normalizedEmail
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const { account: callerAccount } = decodeTokenVerbose(ctx, token)
|
const { account: callerAccount } = decodeTokenVerbose(ctx, token)
|
||||||
|
|
||||||
if (callerAccount !== targetAccount.uuid) {
|
if (callerAccount !== targetAccount.uuid) {
|
||||||
// Login with target email required
|
// Login with target email required
|
||||||
const person = await db.person.findOne({ uuid: targetAccount.uuid })
|
const person = await db.person.findOne({ uuid: targetAccount.uuid })
|
||||||
|
|
||||||
return {
|
return {
|
||||||
workspace: workspace.uuid,
|
workspace: workspace.uuid,
|
||||||
name: person == null ? '' : getPersonName(person),
|
name: person == null ? '' : getPersonName(person),
|
||||||
email: normalizedEmail
|
email: normalizedEmail
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user