fix:修复管理员或作者读取文章时弹出密码页的问题

This commit is contained in:
lifei6671
2018-08-31 10:40:11 +08:00
parent fa1cb9ae33
commit 8243a89e23
3 changed files with 5 additions and 5 deletions

View File

@@ -50,7 +50,7 @@ func (c *BlogController) Index() {
c.JsonResult(0,"OK")
}
c.JsonResult(0,"OK")
}else if blog.BlogStatus == "password" && c.CruSession.Get(blogReadSession) == nil {
}else if blog.BlogStatus == "password" && (c.CruSession.Get(blogReadSession) == nil || (c.Member != nil && blog.MemberId != c.Member.MemberId && !c.Member.IsAdministrator() ) ){
//如果不存在已输入密码的标记
c.TplName = "blog/index_password.tpl"
}