Skip to content

Commit

Permalink
update (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
RWDai authored Dec 22, 2023
1 parent 99f4285 commit a84c260
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions support/iam/src/basic/serv/iam_cert_ldap_serv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ impl IamCertLdapServ {
)
.await;
if let Some(e) = modify_result.err() {
let err_msg = format!("modify phone cert_id:{} failed:{}", phone_cert.id, e);
let err_msg = format!("sync account:{} modify phone cert_id:{} failed:{}", cert.rel_rbum_id, phone_cert.id, e);
tardis::log::error!("{}", err_msg);
msg = format!("{msg}{err_msg}\n");
}
Expand All @@ -843,7 +843,7 @@ impl IamCertLdapServ {
)
.await
{
let err_msg = format!("add phone phone:{} failed:{}", iam_account_ext_sys_resp.mobile.clone(), e);
let err_msg = format!("sync account:{} add phone phone:{} failed:{}", cert.rel_rbum_id, iam_account_ext_sys_resp.mobile.clone(), e);
tardis::log::error!("{}", err_msg);
msg = format!("{msg}{err_msg}\n");
failed += 1;
Expand Down Expand Up @@ -894,7 +894,7 @@ impl IamCertLdapServ {
)
.await;
if let Some(e) = modify_result.err() {
let err_msg = format!("modify email cert_id:{} failed:{}", email_cert.id, e);
let err_msg = format!("sync account:{} modify email cert_id:{} failed:{}", cert.rel_rbum_id, email_cert.id, e);
tardis::log::error!("{}", err_msg);
msg = format!("{msg}{err_msg}\n");
}
Expand All @@ -912,7 +912,7 @@ impl IamCertLdapServ {
)
.await
{
let err_msg = format!("add email email:{} failed:{}", iam_account_ext_sys_resp.email.clone(), e);
let err_msg = format!("sync account:{} add email email:{} failed:{}", cert.rel_rbum_id, iam_account_ext_sys_resp.email.clone(), e);
tardis::log::error!("{}", err_msg);
msg = format!("{msg}{err_msg}\n");
failed += 1;
Expand Down Expand Up @@ -1038,7 +1038,25 @@ impl IamCertLdapServ {
)
.await
{
let err_msg = format!("add phone phone:{} failed:{}", ldap_resp.mobile.clone(), e);
let err_msg = format!("add account:{}add phone phone:{} failed:{}", mock_ctx.owner, ldap_resp.mobile.clone(), e);
tardis::log::error!("{}", err_msg);
msg = format!("{msg}{err_msg}\n");
}

//添加email
let email_cert_conf_id = IamCertServ::get_cert_conf_id_by_kind(&IamCertKernelKind::MailVCode.to_string(), Some(ctx.own_paths.clone()), &funs).await?;
if let Err(e) = IamCertMailVCodeServ::add_cert_skip_activate(
&IamCertMailVCodeAddReq {
mail: TrimString(ldap_resp.email.clone()).to_string(),
},
mock_ctx.owner.as_str(),
email_cert_conf_id.as_str(),
&funs,
ctx,
)
.await
{
let err_msg = format!("add account:{} add email:{} failed:{}", mock_ctx.owner, ldap_resp.email.clone(), e);
tardis::log::error!("{}", err_msg);
msg = format!("{msg}{err_msg}\n");
}
Expand Down

0 comments on commit a84c260

Please sign in to comment.