mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-06 01:37:42 +02:00
UBERF-9724: Fix github functionality on 0.7 (#8554)
* UBERF-9724: Fix github functionality on 0.7 Signed-off-by: Andrey Sobolev <haiodo@gmail.com> * Fix exception for no social id for system account Signed-off-by: Andrey Sobolev <haiodo@gmail.com> --------- Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { AccountClient, IntegrationSecret } from '@hcengineering/account-client'
|
||||
import { systemAccountUuid, type PersonId, type WorkspaceUuid } from '@hcengineering/core'
|
||||
import core, { systemAccountUuid, type PersonId, type WorkspaceUuid } from '@hcengineering/core'
|
||||
import { getAccountClient } from '@hcengineering/server-client'
|
||||
import { generateToken } from '@hcengineering/server-token'
|
||||
import type { GithubUserRecord } from './types'
|
||||
@@ -49,6 +49,9 @@ export class UserManager {
|
||||
if (rec !== undefined) {
|
||||
return rec
|
||||
}
|
||||
if (ref === core.account.System || ref === core.account.ConfigUser) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
const secrets = await this.accountClient.listIntegrationsSecrets({ kind: 'github-user', socialId: ref })
|
||||
if (secrets.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user