mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-05-04 04:57:48 +08:00
fix:修复下载附件的BUG
This commit is contained in:
parent
2f573a929c
commit
fa1cb9ae33
@ -618,7 +618,7 @@ func (c *BlogController) Download() {
|
|||||||
}
|
}
|
||||||
blogReadSession := fmt.Sprintf("blog:read:%d",blogId)
|
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, "没有下载权限")
|
c.ShowErrorPage(403, "没有下载权限")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user