@@ -20,7 +20,7 @@ class Arguments:
20
20
category = graphene .Field (CategoryType )
21
21
22
22
def mutate (self , info , id , input ):
23
- check_user_permissions (info , allowed_roles = [UserRole .PRODUCT_MANAGER , UserRole .STORE_MANAGER , UserRole .ADMIN ])
23
+ check_user_permissions (info , allowed_roles = [UserRole .STORE_MANAGER , UserRole .ADMIN , UserRole .PRODUCT_MANAGER ])
24
24
category = Category .objects .get (id = id )
25
25
category .name = input .name
26
26
category .description = input .description
@@ -48,7 +48,7 @@ class Arguments:
48
48
product_translation = graphene .Field (ProductTranslationType )
49
49
50
50
def mutate (self , info , base_product_id , lang_code , name , summary , description , meta_title , meta_description ):
51
- check_user_permissions (info , allowed_roles = [UserRole .PRODUCT_MANAGER , UserRole .STORE_MANAGER ])
51
+ check_user_permissions (info , allowed_roles = [UserRole .STORE_MANAGER , UserRole . ADMIN , UserRole . PRODUCT_MANAGER , UserRole .TRANSLATOR ])
52
52
try :
53
53
product_translation = ProductTranslation .objects .get (product_id = base_product_id , language_code = lang_code )
54
54
except ProductTranslation .DoesNotExist :
@@ -76,7 +76,7 @@ class Arguments:
76
76
category_translation = graphene .Field (CategoryTranslationType )
77
77
78
78
def mutate (self , info , base_category_id , lang_code , name , description , meta_title , meta_description ):
79
- check_user_permissions (info , allowed_roles = [UserRole .PRODUCT_MANAGER , UserRole .STORE_MANAGER , UserRole .ADMIN ])
79
+ check_user_permissions (info , allowed_roles = [UserRole .STORE_MANAGER , UserRole .ADMIN , UserRole .PRODUCT_MANAGER , UserRole . TRANSLATOR ])
80
80
try :
81
81
category_translation = CategoryTranslation .objects .get (category_id = base_category_id , language_code = lang_code )
82
82
except CategoryTranslation .DoesNotExist :
@@ -103,7 +103,7 @@ class Arguments:
103
103
supplier_translation = graphene .Field (SupplierTranslationType )
104
104
105
105
def mutate (self , info , base_supplier_id , lang_code , name , description , meta_title , meta_description ):
106
- check_user_permissions (info , allowed_roles = [UserRole .PRODUCT_MANAGER , UserRole .STORE_MANAGER , UserRole .ADMIN ])
106
+ check_user_permissions (info , allowed_roles = [UserRole .STORE_MANAGER , UserRole .ADMIN , UserRole .PRODUCT_MANAGER , UserRole . TRANSLATOR ])
107
107
try :
108
108
supplier_translation = SupplierTranslation .objects .get (supplier_id = base_supplier_id , language_code = lang_code )
109
109
except SupplierTranslation .DoesNotExist :
@@ -127,7 +127,7 @@ class Arguments:
127
127
product_variant_translation = graphene .Field (ProductVariantTranslationType )
128
128
129
129
def mutate (self , info , base_product_variant_id , lang_code , name , description , meta_title , meta_description ):
130
- check_user_permissions (info , allowed_roles = [UserRole .PRODUCT_MANAGER , UserRole .STORE_MANAGER , UserRole .ADMIN ])
130
+ check_user_permissions (info , allowed_roles = [UserRole .STORE_MANAGER , UserRole .ADMIN , UserRole .PRODUCT_MANAGER , UserRole . TRANSLATOR ])
131
131
try :
132
132
product_variant_translation = ProductVariantTranslation .objects .get (product_variant_id = base_product_variant_id , language_code = lang_code )
133
133
except ProductVariantTranslation .DoesNotExist :
@@ -147,7 +147,7 @@ class Arguments:
147
147
product_tag_translation = graphene .Field (ProductTagTranslationType )
148
148
149
149
def mutate (self , info , base_product_tag_id , lang_code , name , description , meta_title , meta_description ):
150
- check_user_permissions (info , allowed_roles = [UserRole .PRODUCT_MANAGER , UserRole .STORE_MANAGER , UserRole .ADMIN ])
150
+ check_user_permissions (info , allowed_roles = [UserRole .STORE_MANAGER , UserRole .ADMIN , UserRole .PRODUCT_MANAGER , UserRole . TRANSLATOR ])
151
151
try :
152
152
product_tag_translation = ProductTagTranslation .objects .get (product_tag_id = base_product_tag_id , language_code = lang_code )
153
153
except ProductTagTranslation .DoesNotExist :
@@ -170,7 +170,7 @@ class Arguments:
170
170
collection_translation = graphene .Field (CollectionTranslationType )
171
171
172
172
def mutate (self , info , base_collection_id , lang_code , name , description , meta_title , meta_description ):
173
- check_user_permissions (info , allowed_roles = [UserRole .PRODUCT_MANAGER , UserRole .STORE_MANAGER , UserRole .ADMIN ])
173
+ check_user_permissions (info , allowed_roles = [UserRole .STORE_MANAGER , UserRole .ADMIN , UserRole .PRODUCT_MANAGER , UserRole . TRANSLATOR ])
174
174
try :
175
175
collection_translation = CollectionTranslation .objects .get (collection_id = base_collection_id , language_code = lang_code )
176
176
except CollectionTranslation .DoesNotExist :
0 commit comments