Skip to content

Commit 38c19a4

Browse files
committed
超级管理员可以下载未发表的附件
1 parent eeec2db commit 38c19a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/blog/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def download(request, param1, param2):
256256
return HttpResponseRedirect(article_url)
257257
else:
258258
target_article = get_object_or_404(Article, pk=article_id)
259-
if target_article.status == 'd':
259+
if target_article.status == 'd' and not request.user.is_superuser:
260260
return HttpResponseRedirect('/')
261261

262262
def file_iterator(file_name, chunk_size=512):

0 commit comments

Comments
 (0)