Skip to content

关于增加审计日志功能的构想 #19

Description

@renbaoshuo

背景

在 S2OJ 的使用过程中,有一些敏感操作是不会记录操作者信息的。随着题目管理员数量的日渐增加,增加审计日志的必要性在日渐提升。

需求

为 S2OJ 增加审计日志功能。

实现细节

数据表

新增:audit_logs

列名 数据类型 说明
username varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL 用户名
type varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL 记录类型
target_id int NOT NULL 对应项目的 ID
time datetime DEFAULT CURRENT_TIMESTAMP 时间
remote_addr varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL remote_addr
http_x_forwarded_for varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL http_x_forwarded_for
detail json NOT NULL 详情

记录类型

TODO

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions