fix
This commit is contained in:
parent
73ee2281b9
commit
27d4166fae
|
@ -36,7 +36,11 @@ func (l *GetLdapOrganizationMembersLogic) GetLdapOrganizationMembers(req *types.
|
|||
if len(req.OrganizationDN) <= 3 || req.OrganizationDN[:3] != "ou=" {
|
||||
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "参数错误,无效的组织DN")
|
||||
}
|
||||
|
||||
//先获取组织信息
|
||||
/*ldapServer := ldap_lib.NewLdap(l.svcCtx.Ldap, l.svcCtx.Config.Ldap.BaseDN, l.svcCtx.Config.Ldap.RootDN)
|
||||
filter := "(objectClass=groupOfUniqueNames)"
|
||||
fields := ""
|
||||
ldapServer.Search(req.OrganizationDN, ldap.ScopeWholeSubtree, filter, nil, nil)*/
|
||||
return resp.SetStatus(basic.CodeOK)
|
||||
}
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@ func (l *GetLdapUserInfoLogic) GetLdapUserInfo(req *types.GetLdapUserInfoReq, us
|
|||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "获取用户信息失败:"+err.Error())
|
||||
}
|
||||
if len(res.Entries) > 1 {
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "查询到的不是用户信息")
|
||||
if len(res.Entries) != 1 {
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "查询到不到用户信息")
|
||||
}
|
||||
isUser := false
|
||||
apiRsp := types.GetLdapUserInfoRsp{
|
||||
|
|
Loading…
Reference in New Issue
Block a user