Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/ideal-world/bios
Browse files Browse the repository at this point in the history
  • Loading branch information
ljl committed Jul 3, 2024
2 parents 0bd4743 + dc8418a commit 1d8df44
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/supports/iam/src/basic/serv/iam_cert_serv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ impl IamCertServ {
.await?;
if let Some(ext_cert) = ext_cert {
let encoded_sk = if show_sk {
let now_sk = RbumCertServ::show_sk(ext_cert.id.as_str(), &RbumCertFilterReq::default(), funs, ctx).await?;
let now_sk = RbumCertServ::show_sk(ext_cert.id.as_str(), &RbumCertFilterReq::default(), funs, &mock_ctx).await?;
encode_cert(&ext_cert.id, now_sk, ext_cert.sk_invisible)?
} else {
"".to_string()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,35 @@ impl IamCiAccountApi {
TardisResp::ok(result)
}

/// Batch Find Account By ThirdParty Cert ak
/// 通过三方凭证ak批量查找帐户
///
#[oai(path = "/batch-third-party", method = "get")]
async fn batch_by_third_party(&self, supplier: Query<String>, aks: Query<String>, mut ctx: TardisContextExtractor, request: &Request) -> TardisApiResult<Vec<IamAccountDetailResp>> {
let funs = iam_constants::get_tardis_inst();
check_without_owner_and_unsafe_fill_ctx(request, &funs, &mut ctx.0)?;
let mut result=vec![];
for ak in aks.0.split(','){
let cert = IamCertServ::get_3th_kind_cert_by_ak(&supplier.0, &ak, true, &funs, &ctx.0).await?;
result.push(IamAccountServ::get_item(
&cert.rel_rbum_id,
&IamAccountFilterReq {
basic: RbumBasicFilterReq {
own_paths: Some("".to_string()),
with_sub_own_paths: true,
..Default::default()
},
..Default::default()
},
&funs,
&ctx.0,
)
.await?);
}

TardisResp::ok(result)
}

/// Find App Set Items (Account) ctx
/// 查找应用集合项(帐户)上下文
#[oai(path = "/apps/item/ctx", method = "get")]
Expand Down

0 comments on commit 1d8df44

Please sign in to comment.