]> git.ipfire.org Git - dbl.git/commitdiff
reports: Allow trusted users to accept their own reports
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Mar 2026 15:43:57 +0000 (15:43 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Mar 2026 15:43:57 +0000 (15:43 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/dbl/reports.py

index e716f8f321f5b7eeb7725e5220956216066f6abf..370f4379efa2dcd6af66c2f64229466d9aee4e01 100644 (file)
@@ -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