This commit is contained in:
laodaming 2023-11-15 17:37:40 +08:00
parent 33c5cc6b0b
commit 4e53d11cbd

View File

@ -43,7 +43,7 @@ type DNItem struct {
func (l *GetDepartmentsLogic) GetDepartments(req *types.Request, userinfo *auth.UserInfo) (resp *basic.Response) { func (l *GetDepartmentsLogic) GetDepartments(req *types.Request, userinfo *auth.UserInfo) (resp *basic.Response) {
//从ldap获取组织架构数据 //从ldap获取组织架构数据
searchRequest := ldap.NewSearchRequest( searchRequest := ldap.NewSearchRequest(
l.svcCtx.Config.Ldap.BaseDN, l.svcCtx.Config.Ldap.BaseDN, //这里后续需要修改,不同的人只能查询他的下属列表
ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false,
"(objectClass=*)", //所有object "(objectClass=*)", //所有object
nil, nil,