diff --git a/server/ldap-admin/internal/logic/getdepartmentslogic.go b/server/ldap-admin/internal/logic/getdepartmentslogic.go index 17398ec3..2218b960 100644 --- a/server/ldap-admin/internal/logic/getdepartmentslogic.go +++ b/server/ldap-admin/internal/logic/getdepartmentslogic.go @@ -40,7 +40,7 @@ type mapDnItem struct { } func (l *GetDepartmentsLogic) GetDepartments(req *types.Request, userinfo *auth.UserInfo) (resp *basic.Response) { - // todo 从ldap获取组织架构数据 + //从ldap获取组织架构数据 searchBase := "dc=fusen,dc=com" // 创建搜索请求 searchRequest := ldap.NewSearchRequest( @@ -110,73 +110,3 @@ func (l *GetDepartmentsLogic) GetDepartments(req *types.Request, userinfo *auth. } return resp.SetStatusWithMessage(basic.CodeOK, "", list) } - -/* -dn: dc=fusen,dc=com -o : [fusen com] -dc : [fusen] -objectClass : [top dcObject organization] - -dn: cn=root,dc=fusen,dc=com -cn : [root] -objectClass : [organizationalRole] -description : [Directory Manager] - -dn: ou=People,dc=fusen,dc=com -ou : [People] -objectClass : [top organizationalUnit] -telephoneNumber : [aabb] - -dn: ou=Group,dc=fusen,dc=com -ou : [Group] -objectClass : [top organizationalUnit] -dn: uid=fsuser,ou=People,dc=fusen,dc=com -uid : [fsuser] -cn : [fsuser] -sn : [fsuser] -mail : [fsuser@fusen.com] -objectClass : [person organizationalPerson inetOrgPerson posixAccount top shadowAccount] -userPassword : [{crypt}$6$fpyhuX7q$XBAA2URfWZCYZRLQpzzqucuFymrYvJL/NXztQ6/ug89GHvfN.OCUOGOZzyoKZwgF/LXToY5Wmqf9Yb0JoQbkL1] -shadowLastChange : [19674] -shadowMin : [0] -shadowMax : [99999] -shadowWarning : [7] -loginShell : [/bin/bash] -uidNumber : [1000] -gidNumber : [1000] -homeDirectory : [/home/fsuser] - -dn: uid=fstest,ou=People,dc=fusen,dc=com -uid : [fstest] -cn : [fstest] -sn : [fstest] -mail : [fstest@fusen.com] -objectClass : [person organizationalPerson inetOrgPerson posixAccount top shadowAccount] -userPassword : [{crypt}$6$SYX2T3.y$OvYYU08PG8g.4SvI3A4MHSzfK5qSZeqB/2StqXxtd0E/RAENXFXBQH4bvkjLsbcDQMMobkzoyRyVJZv5xcK3r0] -shadowLastChange : [19674] -shadowMin : [0] -shadowMax : [99999] -shadowWarning : [7] -loginShell : [/bin/bash] -uidNumber : [1001] -gidNumber : [1001] -homeDirectory : [/home/fstest] -mobile : [17557283677] - -dn: cn=fusen,ou=Group,dc=fusen,dc=com -objectClass : [posixGroup top] -cn : [fusen] -userPassword : [{crypt}x] -gidNumber : [1000] - -dn: cn=fusen2,ou=Group,dc=fusen,dc=com -objectClass : [posixGroup top] -cn : [fusen2] -userPassword : [{crypt}x] -gidNumber : [1001] - -dn: cn=gitlab,ou=Group,dc=fusen,dc=com -objectClass : [top groupOfNames] -cn : [gitlab] -member : [uid=testuser,ou=People,dc=funsen,dc=com] -*/