fix v12
This commit is contained in:
@@ -443,3 +443,19 @@ Community rules and content boundaries / コミュニティルールとコンテ
|
||||
⚠️ 用户反馈「成功页按钮还是老样子」时,先确认**是否真的部署了**:直接抓线上 HTML 看有没有新标记
|
||||
(`grep 'uk-margin-large-top uk-text-center'` 在 `/rules` 上)。实测那次线上仍是 `uk-margin-large-top"`
|
||||
旧结构 → 与浏览器缓存无关,是代码没更新。以后别先怀疑缓存。
|
||||
(第二次复测已生效:`uk-text-center` 在、弹窗按钮 `>送信<`、成功页 `flex: 1 1 160px` 出现 2 次。)
|
||||
|
||||
## 受控用户强制最高审核档(用户要求:不分级,全部级别)
|
||||
|
||||
- `moderation.EffectiveStrictness(ctx, userID, raw)`:**有任何处置(L1–L4)就返回 strict**,忽略账号设置。
|
||||
**处置查询失败时回退账号自身设置**,而不是"失败即强制 strict" —— 否则 DB 抖动会让全站突然加严、
|
||||
正常提交被大面积误拒,影响面远大于漏放一个受控账号。
|
||||
- 7 个审核调用点全部从 `StrictnessFor(raw)` 改为 `EffectiveStrictness(...)`:chat_handler、follow_up×2、
|
||||
page、question、user/vote×3、vote/vote。`StrictnessFor` 保留为纯解析函数(模板回显用)。
|
||||
- `UpdateModerationStrictness`:处置期内直接拒绝保存并 flash `admin.flash.strictnessLocked`。
|
||||
- 设置页 `templates/user/moderation-strictness.html`:`$root.StrictnessLocked` 时提示 + select/按钮 disabled。
|
||||
⚠️ 该文件仍只能用 shell/python 改(Edit/Write 会注入 `data-page-node-id`),本次用 python 精确替换。
|
||||
- Profile handler 注入 `StrictnessLocked`(读 ActiveLevel)。
|
||||
|
||||
验证:`go build ./...` EXIT=0;checktpl OK;db/i18n/templates 测试全绿。
|
||||
性能:每次内容提交多一次 `user_restrictions` 查询(走 user_id 索引),审核本身要走七牛网络,1ms 可忽略。
|
||||
|
||||
Reference in New Issue
Block a user