Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix reviews remarks
fowczarekc34eb3d7ccb8
diff --git a/saleor/graphql/account/mutations.py b/saleor/graphql/account/mutations.pyindex 0e8e2709d7..b7a9561e3c 100644--- a/saleor/graphql/account/mutations.py+++ b/saleor/graphql/account/mutations.py@@ -155,7 +155,7 @@ class CustomerUpdate(CustomerCreate):class LoggedUserUpdate(CustomerCreate):class Arguments:input = UserAddressInput(- description='Fields required to update logged in customer.',+ description='Fields required to update logged in user.',required=True)class Meta:@@ -165,8 +165,7 @@ class LoggedUserUpdate(CustomerCreate):@classmethoddef user_is_allowed(cls, user, input):- id = graphene.Node.to_global_id('User', user.id)- return user.has_perm('account.manage_users') or id == input['id']+ return user.is_authenticated@classmethoddef mutate(cls, root, info, **data):diff --git a/tests/api/test_account.py b/tests/api/test_account.pyindex 0caa03b3da..694a9ac879 100644--- a/tests/api/test_account.py+++ b/tests/api/test_account.py@@ -143,7 +143,7 @@ def test_query_user(staff_api_client, customer_user, permission_manage_users):assert address['phone'] == user_address.phone.as_e164-def test_customer_can_see_his_user_data(user_api_client):+def test_customer_can_see_his_own_data(user_api_client):query = """query User($id: ID!) {user(id: $id) {