feat(imTenant): 新增商户管理员账号查看与密码修改功能
1. 新增编辑页管理员账号展示与密码修改字段,仅编辑态可见 2. 新增商户管理员密码重置逻辑,完善编辑场景密码校验 3. 补充超管可见控制:业务库、连接串、管理员信息非超管脱敏 4. 修复schema未使用响应式值的问题
This commit is contained in:
@@ -94,6 +94,11 @@ func (in *ImTenantEditInp) Filter(ctx context.Context) (err error) {
|
||||
if e := g.Validator().Rules("required|length:6,32").Data(in.AdminPassword).Messages("管理员密码不能为空|管理员密码长度应为6到32位").Run(ctx); e != nil {
|
||||
return e.Current()
|
||||
}
|
||||
} else if in.AdminPassword != "" {
|
||||
// 编辑时填写了新密码则重置,留空表示不修改
|
||||
if e := g.Validator().Rules("length:6,32").Data(in.AdminPassword).Messages("管理员密码长度应为6到32位").Run(ctx); e != nil {
|
||||
return e.Current()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -113,6 +118,7 @@ func (in *ImTenantViewInp) Filter(ctx context.Context) (err error) {
|
||||
|
||||
type ImTenantViewModel struct {
|
||||
entity.ImTenant
|
||||
AdminUsername string `json:"adminUsername" dc:"商户管理员账号"`
|
||||
MaxUsers uint64 `json:"maxUsers" dc:"最大用户数"`
|
||||
MaxGroups uint64 `json:"maxGroups" dc:"最大群组数"`
|
||||
MaxGroupMembers uint `json:"maxGroupMembers" dc:"最大群成员数"`
|
||||
|
||||
Reference in New Issue
Block a user