fix
This commit is contained in:
parent
b9399f887b
commit
33c5cc6b0b
|
@ -60,13 +60,14 @@ func (l *GetDepartmentsLogic) GetDepartments(req *types.Request, userinfo *auth.
|
||||||
sortNum++
|
sortNum++
|
||||||
attribute := make(map[string]interface{})
|
attribute := make(map[string]interface{})
|
||||||
for _, attr := range v.Attributes {
|
for _, attr := range v.Attributes {
|
||||||
|
//objectcalss属性特别处理
|
||||||
if attr.Name == "objectClass" {
|
if attr.Name == "objectClass" {
|
||||||
mapObjectClass := make(map[string]struct{})
|
mapObjectClass := make(map[string]struct{})
|
||||||
for _, objectClassItem := range attr.Values {
|
for _, objectClassItem := range attr.Values {
|
||||||
mapObjectClass[objectClassItem] = struct{}{}
|
mapObjectClass[objectClassItem] = struct{}{}
|
||||||
}
|
}
|
||||||
attribute[attr.Name] = mapObjectClass
|
attribute[attr.Name] = mapObjectClass
|
||||||
} else {
|
} else { //普通属性
|
||||||
attribute[attr.Name] = strings.Join(attr.Values, ",")
|
attribute[attr.Name] = strings.Join(attr.Values, ",")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user