From: Michael Tremer Date: Tue, 10 Mar 2026 15:43:57 +0000 (+0000) Subject: reports: Allow trusted users to accept their own reports X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f84f6a2d1cf2299f06502bdd9ef57924e963708;p=dbl.git reports: Allow trusted users to accept their own reports Signed-off-by: Michael Tremer --- diff --git a/src/dbl/reports.py b/src/dbl/reports.py index e716f8f..370f437 100644 --- a/src/dbl/reports.py +++ b/src/dbl/reports.py @@ -342,8 +342,8 @@ class Report(sqlmodel.SQLModel, database.BackendMixin, table=True): # The owners have some permissions... if self.reported_by == user.uid: - # Users cannot accept their own reports - if accept: + # Users cannot accept their own reports unless they are trusted + if accept and not user.is_trusted(): return False # Otherwise users can manage their own reports