Skip to content

Commit

Permalink
fix(rules): require order statse Pending on create
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerald Baulig committed Apr 17, 2024
1 parent a286e4c commit cb19845
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions datasets/system/data/seed-data/policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: ""
Expand Down
16 changes: 8 additions & 8 deletions datasets/system/data/seed-data/rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -739,7 +739,7 @@
context?.resources?.some(
resource => (
!resource.order_state
|| resource.order_state?.toString() === 'CREATED'
|| resource.order_state?.toString() === 'PENDING'
)
)
"
Expand All @@ -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
Expand All @@ -770,7 +770,7 @@
context?.resources?.some(
resource => (
!resource.order_state
|| resource.order_state?.toString() === 'CREATED'
|| resource.order_state?.toString() === 'PENDING'
)
)
"
Expand Down

0 comments on commit cb19845

Please sign in to comment.