forgejo/tests/integration/fixtures/TestAdminModerationViewReports/abuse_report.yml
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

111 lines
3.7 KiB
YAML

-
id: 1
status: 1 # Open
reporter_id: 1004 # @reporter1
content_type: 1 # User (users or organizations)
content_id: 1003 # @SPAM-services
category: 4 # IllegalContent
remarks: This organization was created for spamming.
shadow_copy_id: null
created_unix: 1121423460 # 2005-07-15 10:31:00
-
id: 2
status: 1
reporter_id: 1004 # @reporter1
content_type: 2 # Repository
content_id: 1002 # SPAM-services/spammer-tools
category: 4 # IllegalContent
remarks: This repository was created for building spamming tools.
shadow_copy_id: null
created_unix: 1121423520 # 2005-07-15 10:32:00
-
id: 3
status: 1
reporter_id: 1004 # @reporter1
content_type: 3 # Issue (issues or pull requests)
content_id: 1002 # SPAM-services/spammer-tools#1
category: 2 # Spam
remarks: This issue advertises spam services.
shadow_copy_id: null
created_unix: 1121423580 # 2005-07-15 10:33:00
-
id: 4
status: 1
reporter_id: 1004 # @reporter1
content_type: 1 # User (users or organizations)
content_id: 1002 # @spammer01
category: 2 # Spam
remarks: |
This profile advertises spam services and the user already created spam content.
I have reported some of them.
shadow_copy_id: null
created_unix: 1121423640 # 2005-07-15 10:34:00
-
id: 5
status: 1
reporter_id: 1004 # @reporter1
content_type: 4 # Comment
content_id: 1001 # contributor/first/issues/1#issuecomment-1001
category: 3 # Malware
remarks: This comment references a spammy issue from a spammy repository of a spammy organization created by a spammer.
shadow_copy_id: null
created_unix: 1121423700 # 2005-07-15 10:35:00
-
id: 6
status: 1
reporter_id: 1001 # @contributor
content_type: 4 # Comment
content_id: 1001 # contributor/first/issues/1#issuecomment-1001
category: 2 # Spam
remarks: I should delete this, since I can; but first I want to test the reporting functionality.
shadow_copy_id: null
created_unix: 1121423730 # 2005-07-15 10:35:30
-
id: 7
status: 1
reporter_id: 1001 # @contributor
content_type: 1 # User (users or organizations)
content_id: 1002 # @spammer01
category: 1 # Other
remarks: Should investigate the origin of this abuser.
shadow_copy_id: null
created_unix: 1121423760 # 2005-07-15 10:36:00
-
id: 8
status: 1
reporter_id: 1002 # @spammer01
content_type: 3 # Issue (issues or pull requests)
content_id: 1001 # contributor/first#1
category: 1 # Other
remarks: Just because you are the administrator of this Forgejo instance this doesn't mean that you should be more privileged compared to the rest of average users. I believe it is my right to post links to external websites where users can find more about myself and my own work, even if they are professional services. I strongly believe you should reconsider your totalitarian behaviour. The users of this instance deserve better, more inclusive rules that should prevent abuses from administrators or mod.
shadow_copy_id: null
created_unix: 1121424000 # 2005-07-15 10:40:00
-
id: 9
status: 1
reporter_id: 1005 # @reporter2
content_type: 1 # User (users or organizations)
content_id: 1002 # @spammer01
category: 2 # Spam
remarks: This user is just spamming wherever they can.
shadow_copy_id: null
created_unix: 1121424030 # 2005-07-15 10:40:30
-
id: 10
status: 1
reporter_id: 1005 # @reporter2
content_type: 1 # User (users or organizations)
content_id: 9999 # Ghost user
category: 1 # Other
remarks: Check this spammer as soon as possible, before they delete their account.
shadow_copy_id: null
created_unix: 1121424150 # 2005-07-15 10:42:30