This commit is contained in:
laodaming 2023-11-16 14:57:36 +08:00
parent 97d94919e4
commit 2aae36dfca

View File

@ -42,14 +42,13 @@ func (l *UpdateLdapOrginationLogic) UpdateLdapOrgination(req *types.UpdateLdapOr
}
ldapServer := ldap_lib.NewLdap(l.svcCtx.Ldap, l.svcCtx.Config.Ldap.BaseDN, l.svcCtx.Config.Ldap.RootDN)
if err := ldapServer.Update(req.OrginationDN, map[string][]string{
"orgination_dn": {req.OrginationDN},
"business_category": {req.BusinessCategory},
"cn": {req.BusinessCategory},
"businessCategory": {req.BusinessCategory},
}); err != nil {
logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeServiceErr, "更新ldap组织失败,", err.Error())
}
return resp.SetStatusWithMessage(basic.CodeOK, "更新成功")
return resp.SetStatus(basic.CodeOK)
}
// 处理逻辑后 w,r 如:重定向, resp 必须重新处理