From 3cdcc1b59b24b3510ad9ab44ff0201128ea9a202 Mon Sep 17 00:00:00 2001
From: ZzIsGod1019 <1498852723@qq.com>
Date: Tue, 9 Apr 2024 10:51:30 +0800
Subject: [PATCH] open-api: fix bug && update test (#702)
* open-api: fix bug
* update
---
backend/supports/iam/src/basic/serv/iam_open_serv.rs | 5 +++++
.../iam/src/console_interface/api/iam_ci_open_api.rs | 2 +-
backend/supports/iam/tests/test_ci_open.rs | 6 +++++-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/backend/supports/iam/src/basic/serv/iam_open_serv.rs b/backend/supports/iam/src/basic/serv/iam_open_serv.rs
index f4610d19e..09aec2868 100644
--- a/backend/supports/iam/src/basic/serv/iam_open_serv.rs
+++ b/backend/supports/iam/src/basic/serv/iam_open_serv.rs
@@ -445,6 +445,10 @@ impl IamOpenServ {
// let spec_id = IamRelServ::find_from_id_rels(&IamRelKind::IamCertSpec, false, &cert_id, None, None, funs, ctx).await?.pop().unwrap_or_default();
let spec_id = RbumRelServ::find_detail_rbums(
&RbumRelFilterReq {
+ basic: RbumBasicFilterReq {
+ with_sub_own_paths: true,
+ ..Default::default()
+ },
from_rbum_id: Some(cert_id.to_string()),
from_rbum_kind: Some(RbumRelFromKind::Cert),
tag: Some(IamRelKind::IamCertSpec.to_string()),
@@ -463,6 +467,7 @@ impl IamOpenServ {
let spec_code = IamResServ::find_one_detail_item(
&IamResFilterReq {
basic: RbumBasicFilterReq {
+ with_sub_own_paths: true,
ids: Some(vec![spec_id]),
..Default::default()
},
diff --git a/backend/supports/iam/src/console_interface/api/iam_ci_open_api.rs b/backend/supports/iam/src/console_interface/api/iam_ci_open_api.rs
index 829c6491f..780700d45 100644
--- a/backend/supports/iam/src/console_interface/api/iam_ci_open_api.rs
+++ b/backend/supports/iam/src/console_interface/api/iam_ci_open_api.rs
@@ -68,7 +68,7 @@ impl IamCiOpenApi {
/// Get account rule info / 获取账号规则信息
#[oai(path = "/", method = "get")]
- async fn get_rule_info(&self, cert_id: Query