feat(多公司): 第二批 —— 登录带出公司身份、移人仅超管、启动期 DEFAULT 哨兵、列表公司列
company 模块落地(目录读写收窄 + 菜单闸门),并把公司维度接进四个已有出口:
- 登录/current-user 回包带 companyId/companyName,且取名失败不得挡住登录;
- 移人仅超管,且校验「创建人同公司或为超管」不变式(二期免改 77 处过滤点的前提);
- users.company_id 的 DEFAULT 由启动期哨兵盯着,多公司已上线仍未摘则打
COMPANY_DEFAULT_STILL_PRESENT(ASCII 标记串,供 docker logs grep);
- 账号列表加 company_id/company_name 与可选按公司筛选:超管可筛任意公司,
公司内 admin 传别家公司视为无结果(不报错也不越权)。
39 例护栏,29 条变异自证(首轮 25/28 咬死,两条存活都是用例侧的洞:
namesByIds 被 mock 掉所以内部去重从未被证明、contains("公司") 分不清闸门与
不变式;修补后 4/4 KILLED)。业务表零 DDL、零回填。
This commit is contained in:
@@ -23,6 +23,9 @@ public class AdminUserEntity {
|
||||
private String role;
|
||||
@TableField("created_by_id")
|
||||
private Long createdById;
|
||||
/** 所属公司(company.id,V143 新增)。列 NOT NULL,建号必须显式写,见 AdminUserService#createUser。 */
|
||||
@TableField("company_id")
|
||||
private Long companyId;
|
||||
@TableField("created_at")
|
||||
private LocalDateTime createdAt;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user