fix(权限完善):1.权限优化以下模块按钮查看权限全部归属超级管理员,只有职称角色未超级管理员用户才可以查看进入操作
deploy-hxtesting / build-and-deploy (push) Successful in 1m17s

1)如图一所示点击左下角个人信息弹出框中的“空间设置”、“成员管理“、”模型管理“、”全部设置“、”系统管理“
2)点击进入”设置“页面中”空间“、”模型“、”发布集成“、”数据与扩展“、”系统管理“这几个大模块相关内容入口
2.成员管理页面增加一个字段”状态“:1-5 在职状态(试用/试用延期/正式/临时/实习)、6离职/7退休(顺便对数据进行清洗,工号首位带字母的都标记为离职其他都标记为正式)
3.检查各业务需求里所有选择员工相关都只能拉取选择正式员工!
This commit is contained in:
runny committed 2026-12-01 13:14:24 +08:00
1 parent b762deaf15
commit 7034d93256
49 files changed
+809 -130

No files matched your search

+14 -2
View File
@@ -199,8 +199,11 @@ func (s *userService) Register(ctx context.Context, req *types.RegisterRequest)
PasswordHash: string(hashedPassword),
TenantID: 0,
IsActive: true,
CreatedAt: time.Now(),
UpdatedAt: time.Now(),
// 在职状态随工号规则落库(首位字母→离职,否则→正式,000167):
// Excel 批量导入 / CASDOOR 同步 / 管理员开户都经此漏斗,一处生效。
EmploymentStatus: types.EmploymentStatusFromUsername(req.Username),
CreatedAt: time.Now(),
UpdatedAt: time.Now(),
}
if createdTenant != nil {
user.TenantID = createdTenant.ID
@@ -906,6 +909,15 @@ func (s *userService) RevokeSystemAdmin(ctx context.Context, userID, actorID str
// UpdateUserPreferences applies a partial update over the user's
// preferences blob. PATCH semantics: only keys present in `patch`
// (non-nil pointer fields) replace the existing value; everything else
// UpdateEmploymentStatus 修改人员在册在职状态(000167)。调用方(成员管理
// handler,Owner+)已校验 1-7;此处仅做兜底校验后直写 users 列。
func (s *userService) UpdateEmploymentStatus(ctx context.Context, userID string, status int) error {
if !types.IsValidEmploymentStatus(status) {
return errors.New("employment_status must be one of 1-7")
}
return s.userRepo.UpdateEmploymentStatus(ctx, userID, status)
}
// is preserved. This lets the front-end PUT only the preference that
// changed without having to read-modify-write the whole struct, and
// also makes the endpoint forward-compatible — older clients that