[backend] Only allow author to see hidden posts
/ test-build (push) Successful in 1m7s Details

This commit is contained in:
Laura Hausmann 2024-02-04 20:23:42 +01:00
parent f14c5ed4ef
commit 1378037384
Signed by: zotan
GPG Key ID: D044E84C5BE01605
1 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,12 @@ export function generateVisibilityQuery(
}),
);
q.andWhere(new Brackets((qb) => {
qb.where(`note.visibility != 'hidden'`).orWhere(
`note.userId = :meId`,
);
}));
q.setParameters({ meId: me.id });
}
}