From cb1984500e20d56ab1952acb7a84bee160a92f1d Mon Sep 17 00:00:00 2001 From: Gerald Baulig Date: Wed, 17 Apr 2024 16:32:04 +0200 Subject: [PATCH] fix(rules): require order statse Pending on create --- datasets/system/data/seed-data/policies.yaml | 4 ++-- datasets/system/data/seed-data/rules.yaml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/datasets/system/data/seed-data/policies.yaml b/datasets/system/data/seed-data/policies.yaml index 45a598f..a0352dd 100644 --- a/datasets/system/data/seed-data/policies.yaml +++ b/datasets/system/data/seed-data/policies.yaml @@ -416,7 +416,7 @@ - superadministrator-permits-all - administrator-permits-all-hr-scoped - sales-requires-order-state-submitted - - user-requires-order-state-created + - user-requires-order-state-pending meta: modifiedBy: "" owners: @@ -441,7 +441,7 @@ rules: - superadministrator-permits-all - administrator-permits-all-hr-scoped - - customer-requires-order-state-created + - customer-requires-order-state-pending - fallback-deny-all meta: modifiedBy: "" diff --git a/datasets/system/data/seed-data/rules.yaml b/datasets/system/data/seed-data/rules.yaml index 9ebe534..0ded57d 100644 --- a/datasets/system/data/seed-data/rules.yaml +++ b/datasets/system/data/seed-data/rules.yaml @@ -722,9 +722,9 @@ - id: urn:restorecommerce:acs:names:ownerInstance value: system --- - id: user-requires-order-state-created - name: User Requires Order State Created - description: Permits if order state is Created for subject User + id: user-requires-order-state-pending + name: User Requires Order State Pending + description: Permits if order state is Pending for subject User target: subjects: - id: urn:restorecommerce:acs:names:role @@ -739,7 +739,7 @@ context?.resources?.some( resource => ( !resource.order_state - || resource.order_state?.toString() === 'CREATED' + || resource.order_state?.toString() === 'PENDING' ) ) " @@ -753,9 +753,9 @@ - id: urn:restorecommerce:acs:names:ownerInstance value: system --- - id: customer-requires-order-state-created - name: Customer Requires Order State Created - description: Permits if order state is Created for subject Customer + id: customer-requires-order-state-pending + name: Customer Requires Order State Pending + description: Permits if order state is Pending for subject Customer target: subjects: - id: urn:restorecommerce:acs:names:role @@ -770,7 +770,7 @@ context?.resources?.some( resource => ( !resource.order_state - || resource.order_state?.toString() === 'CREATED' + || resource.order_state?.toString() === 'PENDING' ) ) "