Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add missing permissions for webhooks

Maciej Korycinskifa34c223c2e6
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 610ccbd1e1..849cdb843e 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -4323,6 +4323,7 @@ enum WebhookEventTypeEnum {
ORDER_FULLY_PAID
ORDER_UPDATED
ORDER_CANCELLED
+ ORDER_FULFILLED
CUSTOMER_CREATED
PRODUCT_CREATED
}
diff --git a/saleor/webhook/__init__.py b/saleor/webhook/__init__.py
index f2fba1e705..2f5236f36c 100644
--- a/saleor/webhook/__init__.py
+++ b/saleor/webhook/__init__.py
@@ -19,6 +19,7 @@ class WebhookEventType:
(ORDER_FULLYPAID, pgettext_lazy("Order has been fully paid", "Order paid")),
(ORDER_UPDATED, pgettext_lazy("Order has been updated", "Order updated")),
(ORDER_CANCELLED, pgettext_lazy("Order has been cancelled", "Order cancelled")),
+ (ORDER_FULFILLED, pgettext_lazy("Order has been fulfilled", "Order fulfilled")),
(
CUSTOMER_CREATED,
pgettext_lazy("Customer has been created", "Customer created"),
@@ -28,6 +29,9 @@ class WebhookEventType:
PERMISSIONS = {
ORDER_CREATED: "order.manage_orders",
ORDER_FULLYPAID: "order.manage_orders",
+ ORDER_UPDATED: "order.manage_orders",
+ ORDER_CANCELLED: "order.manage_orders",
+ ORDER_FULFILLED: "order.manage_orders",
CUSTOMER_CREATED: "account.manage_users",
PRODUCT_CREATED: "product.manage_products",
}