Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Update order meta should not be protected by permissions
Mira Szewczyk6613306140d9
diff --git a/saleor/graphql/order/mutations/orders.py b/saleor/graphql/order/mutations/orders.pyindex bcd686059b..ccf52cf3a5 100644--- a/saleor/graphql/order/mutations/orders.py+++ b/saleor/graphql/order/mutations/orders.py@@ -424,7 +424,6 @@ class OrderUpdateMeta(UpdateMetaBaseMutation):class Meta:description = "Updates meta for order."model = models.Order- permissions = ("order.manage_orders",)public = Truediff --git a/tests/api/test_order.py b/tests/api/test_order.pyindex 712bc818db..0bc14f249e 100644--- a/tests/api/test_order.py+++ b/tests/api/test_order.py@@ -2287,16 +2287,6 @@ def order_meta_update_variables(order):}-def test_user_without_permission_cannot_update_meta(- staff_api_client, staff_user, update_order_meta, order_meta_update_variables-):- assert not staff_user.has_perm("order.manage_orders")- response = staff_api_client.post_graphql(- update_order_meta, order_meta_update_variables- )- assert_no_permission(response)--def test_user_without_permission_cannot_update_private_meta(staff_api_client, staff_user, update_order_private_meta, order_meta_update_variables):@@ -2307,18 +2297,11 @@ def test_user_without_permission_cannot_update_private_meta(assert_no_permission(response)-def test_user_with_permission_can_update_meta(- permission_manage_orders,- staff_api_client,- staff_user,- update_order_meta,- order_meta_update_variables,- order,+def test_user_does_not_need_permission_to_update_meta(+ staff_api_client, update_order_meta, order_meta_update_variables, order):- staff_user.user_permissions.add(permission_manage_orders)- assert staff_user.has_perm("order.manage_orders")response = staff_api_client.post_graphql(- update_order_meta, order_meta_update_variables+ update_order_meta, order_meta_update_variables, permissions=[])content = get_graphql_content(response)errors = content["data"]["orderUpdateMeta"]["errors"]