修复文档浏览页权限可被绕过的问题

This commit is contained in:
zmister 2021-07-19 15:26:35 +08:00
parent 7d0c9e78f3
commit a1faa63812
2 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,7 @@
- [修复]vditor编辑器粘贴多图片文本时图片只有一张图的问题;
- [修复]找回密码邮件发送失败的问题;
- [修复]后台管理用户管理用户无法搜索的问题;
- [修复]文档访问权限可绕过的问题;
- [优化]个人中心我协作的文集页面及功能;
- [优化]后台邮件服务器配置逻辑和页面展示;

View File

@ -946,6 +946,8 @@ def doc(request,pro_id,doc_id):
try:
if pro_id != '' and doc_id != '':
# 获取文集信息
doc = Doc.objects.get(id=int(doc_id),status__in=[0,1]) # 文档信息
pro_id = doc.top_doc
project = Project.objects.get(id=int(pro_id))
# 获取文集的文档目录
toc_list,toc_cnt = get_pro_toc(pro_id)