mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-15 18:56:59 +00:00
feat!: Abusive content reporting (#6977)
This implements milestones 1. and 4. 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): > 1. A reporting feature is implemented in the database. It ensures that content remains available for review, even if a user deletes it after a report was sent. > 4. Users can report the most relevant content types (at least: issue comments, repositories, users) ### See also: - forgejo/discussions#291 - forgejo/discussions#304 - forgejo/design#30 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6977 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: Otto <otto@codeberg.org> Co-authored-by: floss4good <floss4good@disroot.org> Co-committed-by: floss4good <floss4good@disroot.org>
This commit is contained in:
parent
c1fad04473
commit
dc56486b1f
34 changed files with 1040 additions and 6 deletions
|
@ -32,6 +32,7 @@ import (
|
|||
"forgejo.org/routers/web/feed"
|
||||
"forgejo.org/routers/web/healthcheck"
|
||||
"forgejo.org/routers/web/misc"
|
||||
"forgejo.org/routers/web/moderation"
|
||||
"forgejo.org/routers/web/org"
|
||||
org_setting "forgejo.org/routers/web/org/setting"
|
||||
"forgejo.org/routers/web/repo"
|
||||
|
@ -474,6 +475,11 @@ func registerRoutes(m *web.Route) {
|
|||
m.Get("/search", repo.SearchIssues)
|
||||
}, reqSignIn)
|
||||
|
||||
if setting.Moderation.Enabled {
|
||||
m.Get("/report_abuse", reqSignIn, moderation.NewReport)
|
||||
m.Post("/report_abuse", reqSignIn, web.Bind(forms.ReportAbuseForm{}), moderation.CreatePost)
|
||||
}
|
||||
|
||||
m.Get("/pulls", reqSignIn, user.Pulls)
|
||||
m.Get("/milestones", reqSignIn, reqMilestonesDashboardPageEnabled, user.Milestones)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue