Skip to content

Commit

Permalink
flow: fix bug (instance button show failed)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzIsGod1019 committed Dec 10, 2024
1 parent 37376f1 commit fd720c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/middlewares/flow/src/serv/flow_inst_serv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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());
Expand Down

0 comments on commit fd720c3

Please sign in to comment.