mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-29 19:29:36 +02:00
Fix collab security (#9370)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -29,10 +29,10 @@ import tracker from '@hcengineering/tracker'
|
||||
*/
|
||||
export async function OnGithubBroadcast (txes: Tx[], control: TriggerControl): Promise<Tx[]> {
|
||||
// Enhance broadcast to send DocSyncInfo change only to system account.
|
||||
control.ctx.contextData.broadcast.targets.github = (it) => {
|
||||
control.ctx.contextData.broadcast.targets.github = async (it) => {
|
||||
if (TxProcessor.isExtendsCUD(it._class)) {
|
||||
if ((it as TxCUD<Doc>).objectClass === github.class.DocSyncInfo) {
|
||||
return [systemAccountUuid]
|
||||
return { target: [systemAccountUuid] }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user