fix:修复下载附件的BUG

pull/358/head v0.13.4
lifei6671 2018-08-29 13:48:36 +08:00
parent 2f573a929c
commit fa1cb9ae33
1 changed files with 1 additions and 1 deletions

View File

@ -618,7 +618,7 @@ func (c *BlogController) Download() {
}
blogReadSession := fmt.Sprintf("blog:read:%d",blogId)
//如果没有启动匿名访问,或者设置了访问密码
if (c.Member != nil && !c.EnableAnonymous) || ( blog.BlogStatus == "password" && password != blog.Password && c.CruSession.Get(blogReadSession) == nil) {
if (c.Member == nil && !c.EnableAnonymous) || ( blog.BlogStatus == "password" && password != blog.Password && c.CruSession.Get(blogReadSession) == nil) {
c.ShowErrorPage(403, "没有下载权限")
}