Ace & Markdown全新编辑器 & others

邀请注册
共享后图片可见问题 fileService::getFile()
笔记历史记录问题
共享后得到被共享者列表问题 shareService
themeService 博客主题新建问题, 模板循环引用问题
markdown编辑器双屏大小不能保存问题
This commit is contained in:
life
2015-01-08 21:15:56 +08:00
parent d24531dc78
commit c514d0bc1c
26 changed files with 719 additions and 254 deletions

View File

@ -147,7 +147,16 @@ func (this *FileService) GetFile(userId, fileId string) string {
return path
}
// 2014/12/28 修复, 如果是分享给用户组, 那就不行, 这里可以实现
for _, noteId := range noteIds {
note := noteService.GetNoteById(noteId.Hex())
if shareService.HasReadPerm(note.UserId.Hex(), userId, noteId.Hex()) {
return path;
}
}
/*
// 若有共享给我的笔记?
// 对该笔记可读?
if db.Has(db.ShareNotes, bson.M{"ToUserId": bson.ObjectIdHex(userId), "NoteId": bson.M{"$in": noteIds}}) {
return path
}
@ -166,6 +175,7 @@ func (this *FileService) GetFile(userId, fileId string) string {
return path
}
}
*/
}
// 可能是刚复制到owner上, 但内容又没有保存, 所以没有note->imageId的映射, 此时看是否有fromFileId