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:
Jori Lallo
2016-06-02 22:10:32 -07:00
27 changed files with 526 additions and 184 deletions

View File

@@ -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),
};