修改非文档库成员可看到返回编辑按钮的 bug

This commit is contained in:
xunjianxiang
2017-09-14 19:33:51 +08:00
parent 3899b61d2e
commit 30cdcce948
2 changed files with 4 additions and 5 deletions

View File

@@ -42,12 +42,9 @@ func isReadable(identify, token string, c *DocumentController) *models.BookResul
beego.Error(err)
c.Abort("500")
}
if c.Member != nil && c.Member.IsAdministrator() {
bookResult := book.ToBookResult()
return bookResult
}
//如果文档是私有的
if book.PrivatelyOwned == 1 {
if book.PrivatelyOwned == 1 && !c.Member.IsAdministrator() {
is_ok := false