From fd720c3d805152f5f9aefdc33d807f3686a24b41 Mon Sep 17 00:00:00 2001 From: ZzIsGod1019 <1498852723@qq.com> Date: Tue, 10 Dec 2024 10:02:21 +0800 Subject: [PATCH] flow: fix bug (instance button show failed) --- backend/middlewares/flow/src/serv/flow_inst_serv.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/middlewares/flow/src/serv/flow_inst_serv.rs b/backend/middlewares/flow/src/serv/flow_inst_serv.rs index 3539e86b..80bf7273 100644 --- a/backend/middlewares/flow/src/serv/flow_inst_serv.rs +++ b/backend/middlewares/flow/src/serv/flow_inst_serv.rs @@ -1665,7 +1665,7 @@ impl FlowInstServ { FlowStateKind::Form => kind_conf.form.as_ref().map(|form| { let mut operators = HashMap::new(); let artifacts = artifacts.clone().unwrap_or_default(); - if artifacts.guard_conf.check(ctx) && artifacts.prohibit_guard_by_spec_account_ids.clone().unwrap_or_default().contains(&ctx.owner) { + if artifacts.guard_conf.check(ctx) && !artifacts.prohibit_guard_by_spec_account_ids.clone().unwrap_or_default().contains(&ctx.owner) { operators.insert(FlowStateOperatorKind::Submit, form.submit_btn_name.clone()); if form.referral { if let Some(referral_guard_custom_conf) = &form.referral_guard_custom_conf { @@ -1688,7 +1688,7 @@ impl FlowInstServ { FlowStateKind::Approval => kind_conf.approval.as_ref().map(|approval| { let mut operators = HashMap::new(); let artifacts = artifacts.clone().unwrap_or_default(); - if artifacts.guard_conf.check(ctx) && artifacts.prohibit_guard_by_spec_account_ids.clone().unwrap_or_default().contains(&ctx.owner) { + if artifacts.guard_conf.check(ctx) && !artifacts.prohibit_guard_by_spec_account_ids.clone().unwrap_or_default().contains(&ctx.owner) { operators.insert(FlowStateOperatorKind::Pass, approval.pass_btn_name.clone()); operators.insert(FlowStateOperatorKind::Overrule, approval.overrule_btn_name.clone()); operators.insert(FlowStateOperatorKind::Back, approval.back_btn_name.clone());