Use different account for imported documents (#784)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2022-01-10 18:10:40 +07:00 committed by GitHub
parent fc021b8534
commit 987a8d670a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@
import attachment, { Attachment } from '@anticrm/attachment'
import chunter, { Comment } from '@anticrm/chunter'
import contact, { ChannelProvider, Person } from '@anticrm/contact'
import contact, { ChannelProvider, EmployeeAccount, Person } from '@anticrm/contact'
import core, { AttachedData, AttachedDoc, Class, Data, Doc, DocumentUpdate, Ref, SortingOrder, Space, TxOperations, TxResult, MixinData } from '@anticrm/core'
import recruit from '@anticrm/model-recruit'
import { Applicant, Candidate, Vacancy } from '@anticrm/recruit'
@ -100,7 +100,7 @@ export async function importXml (
console.log('Found candidates:', candidates.length)
// const attributes = new Set<string>()
const client = new TxOperations(connection, core.account.System)
const client = new TxOperations(connection, 'core:account:xml-importer' as Ref<EmployeeAccount>)
const statuses = candidates.map((c: any) => get(c, _.status)).filter((c: any) => c !== undefined)
.filter(onlyUniq)