fix: 英文转译

This commit is contained in:
DengDai
2025-11-24 21:25:38 +08:00
parent c9e11c4bd1
commit 982925b699
5 changed files with 35 additions and 24 deletions

View File

@@ -113,10 +113,15 @@ def report_list():
return render_template('admin/report_list.html', reports=reports_pagination)
@main.route('/report/<int:report_id>', methods=['GET', 'POST'])
@login_required
@permission_required('admin', 'trust_user')
def report_detail(report_id):
"""举报详情"""
report = Report.query.get_or_404(report_id)
# 权限检查:管理员、信任用户、或举报提交者本人可以查看
if current_user.role not in ['admin', 'trust_user'] and report.reporter_id != current_user.id:
flash('您无权查看此举报。', 'warning')
return redirect(url_for('main.index'))
if current_user.role == 'trust_user' and report.status != 'pending':
flash('您无权查看已处理的举报。', 'warning')
return redirect(url_for('main.report_list'))