Skip to content

Commit

Permalink
fix(fulfillment): add courier and product samples, fix fulfillment rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerald Baulig committed May 7, 2024
1 parent d52d962 commit 30c814f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 57 deletions.
21 changes: 21 additions & 0 deletions datasets/demo-shop/data/sample-data/fulfillment_couriers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
id: restorecommerce-demo-shop-courier-000
shopIds:
- restorecommerce-demo-shop-000
name: In House Courier
description: Fulfillments operated by us
logo: ""
website: ""
stubType: Dummy
configuration:
typeUrl: ""
value:
test: "123"
meta:
owners:
- id: urn:restorecommerce:acs:names:ownerIndicatoryEntity
value: urn:restorecommerce:acs:model:organization.Organization
attributes:
- id: urn:restorecommerce:acs:names:ownerInstance
value: restorecommerce-demo-shop-000-organization
---
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
attributes: [ ]
meta:
owners:
- id: 'urn:restorecommerce:acs:names:ownerIndicatoryEntity'
value: 'urn:restorecommerce:acs:model:organization.Organization'
- id: urn:restorecommerce:acs:names:ownerIndicatoryEntity
value: urn:restorecommerce:acs:model:organization.Organization
attributes:
- id: 'urn:restorecommerce:acs:names:ownerInstance'
value: restorecommecre-demo-shop-000-organization
- id: urn:restorecommerce:acs:names:ownerInstance
value: restorecommerce-demo-shop-000-organization
---
20 changes: 0 additions & 20 deletions datasets/demo-shop/data/seed-data/fulfillment_couriers.yaml

This file was deleted.

6 changes: 1 addition & 5 deletions datasets/system/data/seed-data/policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,12 @@
subjects: [ ]
resources:
- id: urn:restorecommerce:acs:names:model:entity
value: urn:restorecommerce:acs:model:fulfillment_courier.FulfillmentCounrier
value: urn:restorecommerce:acs:model:fulfillment_courier.FulfillmentCourier
rules:
- superadministrator-permits-all
- administrator-permits-all-hr-scoped
- sales-permits-read-hr-scoped
- customer-permits-read-hr-scoped
- permit-read-strict-scoped
- domainless-unauthenticated-permits-read-system
- fallback-deny-all
meta:
modifiedBy: ""
Expand Down Expand Up @@ -241,8 +239,6 @@
- administrator-permits-all-hr-scoped
- sales-permits-read-hr-scoped
- customer-permits-read-hr-scoped
- permit-read-strict-scoped
- domainless-unauthenticated-permits-read-system
- fallback-deny-all
meta:
modifiedBy: ""
Expand Down
28 changes: 0 additions & 28 deletions datasets/system/data/seed-data/rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
actions: [ ]
resources: [ ]
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -70,7 +69,6 @@
actions: [ ]
resources: [ ]
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -95,7 +93,6 @@
- id: urn:oasis:names:tc:xacml:1.0:action:action-id
value: urn:restorecommerce:acs:names:action:read
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -118,7 +115,6 @@
actions: [ ]
resources: [ ]
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -143,7 +139,6 @@
- id: urn:oasis:names:tc:xacml:1.0:action:action-id
value: urn:restorecommerce:acs:names:action:read
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -166,7 +161,6 @@
actions: [ ]
resources: [ ]
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -191,7 +185,6 @@
- id: urn:oasis:names:tc:xacml:1.0:action:action-id
value: urn:restorecommerce:acs:names:action:read
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -216,7 +209,6 @@
- id: urn:oasis:names:tc:xacml:1.0:action:action-id
value: urn:restorecommerce:acs:names:action:create
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -241,7 +233,6 @@
- id: urn:oasis:names:tc:xacml:1.0:action:action-id
value: urn:restorecommerce:acs:names:action:update
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -266,7 +257,6 @@
- id: urn:oasis:names:tc:xacml:1.0:action:action-id
value: urn:restorecommerce:acs:names:action:read
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -291,7 +281,6 @@
- id: urn:oasis:names:tc:xacml:1.0:action:action-id
value: urn:restorecommerce:acs:names:action:read
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -316,12 +305,6 @@
actions: [ ]
resources: [ ]
effect: PERMIT
condition: "
!context?.resources?.some(
resource => resource?.user_id !== context.subject?.id
|| resource?.private?.user_id !== context.subject?.id
)
"
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -348,12 +331,6 @@
value: urn:restorecommerce:acs:names:action:create
resources: [ ]
effect: PERMIT
condition: "
!context?.resources?.some(
resource => resource?.user_id !== context.subject?.id
|| resource?.private?.user_id !== context.subject?.id
)
"
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -380,7 +357,6 @@
value: urn:restorecommerce:acs:names:action:update
resources: [ ]
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -405,7 +381,6 @@
value: urn:restorecommerce:acs:names:action:read
resources: [ ]
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -432,7 +407,6 @@
value: urn:restorecommerce:acs:names:action:read
resources: [ ]
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -459,7 +433,6 @@
value: urn:restorecommerce:acs:names:action:create
resources: [ ]
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand All @@ -484,7 +457,6 @@
value: urn:restorecommerce:acs:names:action:update
resources: [ ]
effect: PERMIT
condition: ""
evaluationCacheable: false
meta:
modifiedBy: ""
Expand Down

0 comments on commit 30c814f

Please sign in to comment.