Skip to content

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

Fix incorrect permissions in graphql

Pacu2217a657adf0e
diff --git a/saleor/graphql/product/mutations/products.py b/saleor/graphql/product/mutations/products.py
index eaca19e062..dac4cc93ea 100644
--- a/saleor/graphql/product/mutations/products.py
+++ b/saleor/graphql/product/mutations/products.py
@@ -42,7 +42,7 @@ class CategoryCreate(ModelMutation):
@classmethod
def user_is_allowed(cls, user, input):
- return user.has_perm('category.manage_products')
+ return user.has_perm('product.manage_products')
class CategoryUpdate(CategoryCreate):
@@ -68,7 +68,7 @@ class CategoryDelete(ModelDeleteMutation):
@classmethod
def user_is_allowed(cls, user, input):
- return user.has_perm('category.manage_products')
+ return user.has_perm('product.manage_products')
class CollectionInput(graphene.InputObjectType):
diff --git a/saleor/graphql/shipping/mutations.py b/saleor/graphql/shipping/mutations.py
index 443df91794..8eb12771b1 100644
--- a/saleor/graphql/shipping/mutations.py
+++ b/saleor/graphql/shipping/mutations.py
@@ -107,4 +107,4 @@ class ShippingPriceDelete(ModelDeleteMutation):
@classmethod
def user_is_allowed(cls, user, input):
- return user.has_perm('shipping.manage_pages')
+ return user.has_perm('shipping.manage_shipping')