feat: Add audit logging (#38189)

Co-authored-by: bircni <bircni@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
bircni
2026-09-12 10:15:23 +02:00
committed by GitHub
parent 4d43445532
commit da37b7916b
136 changed files with 3864 additions and 209 deletions
+22
View File
@@ -0,0 +1,22 @@
// Copyright 2026 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package setting
import (
audit_model "gitea.dev/models/audit"
shared_audit "gitea.dev/routers/web/shared/audit"
"gitea.dev/services/context"
)
func ViewAuditLogs(ctx *context.Context) {
shared_audit.View(ctx, shared_audit.ViewOptions{
Template: "org/settings/audit_logs",
ScopeType: audit_model.ScopeOrganization,
ScopeID: ctx.Org.Organization.ID,
PageData: map[string]any{
"PageIsOrgSettings": true,
"PageIsSettingsAudit": true,
},
})
}