fix
This commit is contained in:
parent
2fd6c1459f
commit
48ac52037d
|
@ -17,6 +17,8 @@ type LdapUserInfo struct {
|
||||||
Mobile string `json:"mobile"` //手机号
|
Mobile string `json:"mobile"` //手机号
|
||||||
Avatar string `json:"avatar"` //头像地址
|
Avatar string `json:"avatar"` //头像地址
|
||||||
EmployeeType int64 `json:"employee_type"` //1正式 2实习 3外包
|
EmployeeType int64 `json:"employee_type"` //1正式 2实习 3外包
|
||||||
|
GroupId int64 `json:"group_id"` //权限组id
|
||||||
|
OrganizationDNList []string `json:"organization_dn_list"` //加入的部门
|
||||||
Status int64 `json:"status,options=0|1"` //状态 1正常0离职
|
Status int64 `json:"status,options=0|1"` //状态 1正常0离职
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,6 +77,16 @@ func (l *Ldap) GetLdapUserInfo(userDN string) (*LdapUserInfo, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
case "roomNumber": //权限组id
|
||||||
|
if len(attr.Values) == 0 {
|
||||||
|
return nil, errors.New("权限组id不存在")
|
||||||
|
}
|
||||||
|
user.GroupId, err = strconv.ParseInt(attr.Values[0], 10, 64)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
case "departmentNumber": //加入的部门dn集合
|
||||||
|
user.OrganizationDNList = attr.Values
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if user.UserId == 0 {
|
if user.UserId == 0 {
|
||||||
|
@ -134,6 +146,16 @@ func (l *Ldap) GetLdapBaseTeamUserList(pageSize uint32, filter, pageCookie strin
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, "", err
|
return nil, "", err
|
||||||
}
|
}
|
||||||
|
case "roomNumber": //权限组id
|
||||||
|
if len(attr.Values) == 0 {
|
||||||
|
return nil, "", errors.New("权限组id不存在")
|
||||||
|
}
|
||||||
|
user.GroupId, err = strconv.ParseInt(attr.Values[0], 10, 64)
|
||||||
|
if err != nil {
|
||||||
|
return nil, "", err
|
||||||
|
}
|
||||||
|
case "departmentNumber": //加入的部门dn集合
|
||||||
|
user.OrganizationDNList = attr.Values
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list = append(list, user)
|
list = append(list, user)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user