Fix collab security (#9370)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2025-06-25 17:19:05 +05:00
committed by GitHub
parent 57229b39df
commit 210fc24c85
16 changed files with 135 additions and 38 deletions
@@ -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] }
}
}
}