Merge remote-tracking branch 'origin/mobx-edit' into mobx-edit
# Conflicts: # server/api/documents.js # src/index.js # src/utils/MarkdownOld.js
This commit is contained in:
@@ -21,14 +21,13 @@ router.post('documents.info', auth({ require: false }), async (ctx) => {
|
||||
|
||||
// Don't expose private documents outside the team
|
||||
if (document.private) {
|
||||
if (!ctx.state.user) throw httpErrors.NotFound();
|
||||
// if (!ctx.state.user) throw httpErrors.NotFound();
|
||||
|
||||
const team = await ctx.state.user.getTeam();
|
||||
if (document.teamId !== team.id) {
|
||||
throw httpErrors.NotFound();
|
||||
}
|
||||
|
||||
|
||||
ctx.body = {
|
||||
data: await presentDocument(document, true),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user