Allow editors to see reports

Some reports are about packages and not users
This commit is contained in:
rubenwardy
2025-09-23 09:52:39 +01:00
parent 4004c16504
commit d6e39fb896
2 changed files with 2 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ def report_received():
@bp.route("/admin/reports/")
@rank_required(UserRank.MODERATOR)
@rank_required(UserRank.EDITOR)
def list_all():
reports = Report.query.order_by(db.asc(Report.is_resolved), db.asc(Report.created_at)).all()
return render_template("report/list.html", reports=reports)

View File

@@ -212,7 +212,7 @@ class Report(db.Model):
return False
if perm == Permission.SEE_REPORT:
return user.rank.at_least(UserRank.MODERATOR)
return user.rank.at_least(UserRank.EDITOR)
else:
raise Exception("Permission {} is not related to reports".format(perm.name))