feat: 模型 group 落定为 audit.guichumo.com

- AuditLog.GROUP 常量替换占位(查询端点/测试挂载路径均引用该常量)
- role-template.yaml apiGroups、UI QUERY_ENDPOINT 同步
- README 改为"模型 group 与权限标识"说明,并标注 group 为已落库数据身份、
  启用产生记录后不可随意变更
- 技术方案注明占位示例与落定值(文档中其余 audit.example.com 保留为设计示例)
- ./gradlew test --rerun-tasks 50 例全绿,插件与 UI 构建通过
This commit is contained in:
2026-11-21 17:28:36 +08:00
parent a488360d46
commit 67d9745cd1
7 changed files with 24 additions and 23 deletions
@@ -16,8 +16,8 @@ import run.halo.app.extension.GVK;
plural = "auditlogs", singular = "auditlog")
public class AuditLog extends AbstractExtension {
/** 模型 group(占位域名反写,落地时替换为自有域名,见 README)。 */
public static final String GROUP = "audit.example.com";
/** 模型 group(自有域名反写约定:audit.<你的域名>,见 README)。 */
public static final String GROUP = "audit.guichumo.com";
private AuditLogSpec spec;
}
@@ -13,6 +13,6 @@ rules:
# verbs 仅 get/list(技术方案 D4):被授权角色技术上也无法删除/编辑审计记录
# auditlogs/query 为自有查询端点 /apis/.../auditlogs/-/query 的 RBAC 资源组合
# (资源 auditlogs + 子资源 query,请求动词 get)
- apiGroups: ["audit.example.com"]
- apiGroups: ["audit.guichumo.com"]
resources: ["auditlogs", "auditlogs/query"]
verbs: ["get", "list"]