forgejo/models/issues
floss4good d87e2e7e40 feat: Admin interface for abuse reports (#7905)
- Implementation of milestone 5. from **Task F. Moderation features: Reporting** (part of [amendment of the workplan](https://codeberg.org/forgejo/sustainability/src/branch/main/2022-12-01-nlnet/2025-02-07-extended-workplan.md#task-f-moderation-features-reporting) for NLnet 2022-12-035):
  `5. Forgejo admins can see a list of reports`
  There is a lot of room for improvements, but it was decided to start with a basic version so that feedback can be collected from real-life usages (based on which the UI might change a lot).
- Also covers milestone 2. from same **Task F. Moderation features: Reporting**:
  `2. Reports from multiple users are combined in the database and don't create additional reports.`
  But instead of combining the reports when stored, they are grouped when retrieved (it was concluded _that it might be preferable to take care of the deduplication while implementing the admin interface_; see https://codeberg.org/forgejo/forgejo/pulls/7939#issuecomment-4841754 for more details).

---

Follow-up of !6977

### See also:
- forgejo/design#30

---

This adds a new _Moderation reports_ section (/admin/moderation/reports) within the _Site administration_ page, where administrators can see an overview with the submitted abuse reports that are still open (not yet handled in any way). When multiple reports exist for the same content (submitted by distinct users) only the first one will be shown in the list and a counter can be seen on the right side (indicating the number of open reports for the same content type and ID). Clicking on the counter or the icon from the right side will open the details page where a list with all the reports (when multiple) linked to the reported content is available, as well as any shadow copy saved for the current report(s).
The new section is available only when moderation in enabled ([moderation] ENABLED config is set as true within app.ini).

Discussions regarding the UI/UX started with https://codeberg.org/forgejo/design/issues/30#issuecomment-2908849

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7905
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: jerger <jerger@noreply.codeberg.org>
Co-authored-by: floss4good <floss4good@disroot.org>
Co-committed-by: floss4good <floss4good@disroot.org>
2025-07-23 00:20:15 +02:00
..
TestGetUIDsAndStopwatch fix: use better code to group UID and stopwatches 2024-11-16 15:59:02 +01:00
action_aggregator.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
assignees.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
assignees_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
comment.go fix: make sure to use unaltered fields when saving a shadow copy for updated profiles or comments (#8533) 2025-07-20 23:52:58 +02:00
comment_code.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
comment_list.go fix: load OldMilestone based on OldMilestoneID, not MilestoneID (#8330) 2025-06-29 12:08:03 +02:00
comment_list_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
comment_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
content_history.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
content_history_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
dependency.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
dependency_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue.go chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
issue_index.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_index_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_label.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_label_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_list.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_list_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
issue_lock.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_project.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_project_test.go chore: merge tests.AddFixtures and unittest.OverrideFixtures (#7648) 2025-04-25 09:14:33 +00:00
issue_search.go feat: show more relevant results for 'dependencies' dropdown (#8003) 2025-06-26 20:06:21 +02:00
issue_stats.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_stats_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
issue_update.go chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
issue_user.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_user_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_watch.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_watch_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_xref.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue_xref_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
label.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
label_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
main_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
milestone.go feat(ui): add links to milestones and projects in issue comments (#7992) 2025-06-23 23:31:51 +02:00
milestone_list.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
milestone_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
moderation.go feat: Admin interface for abuse reports (#7905) 2025-07-23 00:20:15 +02:00
moderation_test.go feat: Admin interface for abuse reports (#7905) 2025-07-23 00:20:15 +02:00
pull.go blob: use NewTruncatedReader for CodeOwners parsing 2025-06-20 20:43:10 +02:00
pull_list.go feat: show more relevant results for 'dependencies' dropdown (#8003) 2025-06-26 20:06:21 +02:00
pull_test.go [gitea] week 2025-21 cherry pick (gitea/main -> forgejo) (#8040) 2025-06-16 20:27:47 +02:00
reaction.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
reaction_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
review.go fix: PR not blocked by review request for a whitelisted team (#8511) 2025-07-15 23:21:42 +02:00
review_list.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
review_test.go fix: PR not blocked by review request for a whitelisted team (#8511) 2025-07-15 23:21:42 +02:00
stopwatch.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
stopwatch_test.go chore: merge tests.AddFixtures and unittest.OverrideFixtures (#7648) 2025-04-25 09:14:33 +00:00
tracked_time.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
tracked_time_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00