diff --git a/server/ldap-admin/internal/logic/createldapuserlogic.go b/server/ldap-admin/internal/logic/createldapuserlogic.go index 184336e5..c3dd3ce8 100644 --- a/server/ldap-admin/internal/logic/createldapuserlogic.go +++ b/server/ldap-admin/internal/logic/createldapuserlogic.go @@ -74,18 +74,18 @@ func (l *CreateLdapUserLogic) CreateLdapUser(req *types.CreateLdapUserReq, useri "shadowWarning": {"7"}, //固有属性 "loginShell": {"/usr/sbin/nologin"}, //固有属性 "homeDirectory": {"/home/users/" + userNamePinyin}, - "employeeType": {fmt.Sprintf("%d", req.EmployeeType)}, //1正式 2实习 3外包 - "uidNumber": {fmt.Sprintf("%d", userData.Id)}, - "gidNumber": {fmt.Sprintf("%d", userData.Id)}, - "uid": {userNamePinyin}, - "cn": {req.Email}, - "sn": {req.UserName}, - "mail": {req.Email}, - "postalCode": {fmt.Sprintf("%d", req.Status)}, - "departmentNumber": {"0"}, - "postalAddress": {req.Avatar}, - "mobile": {req.Mobile}, - "userPassword": {"{crypt}" + pwd}, + "employeeType": {fmt.Sprintf("%d", req.EmployeeType)}, //员工类型:1正式 2实习 3外包 + "uidNumber": {fmt.Sprintf("%d", userData.Id)}, //用户id + "gidNumber": {fmt.Sprintf("%d", userData.Id)}, //用户id + "uid": {userNamePinyin}, //用户名(拼音) + "cn": {req.Email}, //邮箱 + "sn": {req.UserName}, //用户名 + "mail": {req.Email}, //邮箱 + "postalCode": {fmt.Sprintf("%d", req.Status)}, //状态 + "departmentNumber": {fmt.Sprintf("%d", req.GroupId)}, //权限分组id + "postalAddress": {req.Avatar}, //头像 + "mobile": {req.Mobile}, //手机号 + "userPassword": {"{crypt}" + pwd}, //密码 }); err != nil { logx.Error(err) return resp.SetStatusWithMessage(basic.CodeServiceErr, "添加用户失败,"+err.Error())