Skip to content

Commit 4d8f6b6

Browse files
author
ljl
committed
iam:fix role.
1 parent fdac739 commit 4d8f6b6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

support/iam/src/basic/serv/iam_app_serv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl IamAppServ {
173173
&app_ctx,
174174
)
175175
.await?;
176-
IamRoleServ::copy_role_agg(&app_id, &IamRoleKind::App, funs, &app_ctx).await?;
176+
IamRoleServ::add_app_copy_role_agg(&app_id, funs, &app_ctx).await?;
177177
let app_admin_role_id = IamRoleServ::get_embed_subrole_id(&funs.iam_basic_role_app_admin_id(), funs, &app_ctx).await?;
178178
// todo 是否需要在这里初始化应用级别的set?
179179
IamSetServ::init_set(IamSetKind::Org, RBUM_SCOPE_LEVEL_APP, funs, &app_ctx).await?;

support/iam/src/basic/serv/iam_role_serv.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ impl IamRoleServ {
470470
..Default::default()
471471
}, funs, ctx).await?;
472472
for app_id in app_ids {
473+
let app_ctx = IamCertServ::try_use_app_ctx(ctx.clone(),Some(app_id.clone()))?;
473474
Self::add_role_agg(
474475
&mut IamRoleAggAddReq {
475476
role: IamRoleAddReq {
@@ -487,7 +488,7 @@ impl IamRoleServ {
487488
res_ids: None,
488489
},
489490
funs,
490-
ctx,
491+
&app_ctx,
491492
)
492493
.await?;
493494
}

0 commit comments

Comments
 (0)