Skip to content

Commit

Permalink
Fix space security (#6428)
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Bykhov <[email protected]>
  • Loading branch information
BykhovDenis authored Aug 28, 2024
1 parent 946d845 commit 2273d99
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/middleware/src/spaceSecurity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export class SpaceSecurityMiddleware extends BaseMiddleware implements Middlewar
params: null
}
ctx.derived.txes.push(tx)
ctx.derived.targets.security = (it) => {
ctx.derived.targets['security' + tx._id] = (it) => {
// TODO: I'm not sure it is called
if (it._id === tx._id) {
return targets
Expand Down Expand Up @@ -383,7 +383,9 @@ export class SpaceSecurityMiddleware extends BaseMiddleware implements Middlewar
await this.processTx(ctx, tx)
const res = await this.provideTx(ctx, tx)
for (const txd of ctx.derived.txes) {
await this.processTx(ctx, txd)
if (txd._id !== tx._id) {
await this.processTx(ctx, txd)
}
}
return res
}
Expand Down

0 comments on commit 2273d99

Please sign in to comment.