We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
graphql_jwt.exceptions.PermissionDenied: You do not have permission to perform this action
### I want to deploy full saleor store(saleor/saleor-dashboard/saleor-storefront) with docker but i catught and expection that means have no permissn to query in graphql api and storefront cant load the main site.
…

### Steps to reproduce the problem
1. git clone https://github.com/mirumee/saleor.git
2. cd saleor
3. docker-compose build
4. And continue to see in accordance with the documentation
![Screenshot from 2019-12-25 16-32-56](https://user-images.githubusercontent.com/22658149/71446013-405f6e00-2734-11ea-8e1c-04d57c7df0ab.png)

### What I expected to happen
load normally the site like before.

### Screenshots
![Screenshot from 2019-12-25 16-28-55](https://user-images.githubusercontent.com/22658149/71445965-dd6dd700-2733-11ea-9fc0-c9e76c8f3595.png)

**System information**
Operating system:
ubuntu 18:04

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `saleor/graphql/account/schema.py`
Content:
```
1 import graphene
2 from graphql_jwt.decorators import login_required
3 
4 from ...core.permissions import AccountPermissions
5 from ..core.fields import FilterInputConnectionField
6 from ..core.types import FilterInputObjectType
7 from ..decorators import one_of_permissions_required, permission_required
8 from .bulk_mutations import CustomerBulkDelete, StaffBulkDelete, UserBulkSetActive
9 from .enums import CountryCodeEnum
10 from .filters import (
11     CustomerFilter,
12     PermissionGroupFilter,
13     ServiceAccountFilter,
14     StaffUserFilter,
15 )
16 from .mutations.account import (
17     AccountAddressCreate,
18     AccountAddressDelete,
19     AccountAddressUpdate,
20     AccountDelete,
21     AccountRegister,
22     AccountRequestDeletion,
23     AccountSetDefaultAddress,
24     AccountUpdate,
25     AccountUpdateMeta,
26     ConfirmEmailChange,
27     RequestEmailChange,
28 )
29 from .mutations.base import (
30     ConfirmAccount,
31     PasswordChange,
32     RequestPasswordReset,
33     SetPassword,
34     UserClearMeta,
35     UserUpdateMeta,
36 )
37 from .mutations.permission_group import (
38     PermissionGroupAssignUsers,
39     PermissionGroupCreate,
40     PermissionGroupDelete,
41     PermissionGroupUnassignUsers,
42     PermissionGroupUpdate,
43 )
44 from .mutations.service_account import (
45     ServiceAccountClearPrivateMeta,
46     ServiceAccountCreate,
47     ServiceAccountDelete,
48     ServiceAccountTokenCreate,
49     ServiceAccountTokenDelete,
50     ServiceAccountUpdate,
51     ServiceAccountUpdatePrivateMeta,
52 )
53 from .mutations.staff import (
54     AddressCreate,
55     AddressDelete,
56     AddressSetDefault,
57     AddressUpdate,
58     CustomerCreate,
59     CustomerDelete,
60     CustomerUpdate,
61     StaffCreate,
62     StaffDelete,
63     StaffUpdate,
64     UserAvatarDelete,
65     UserAvatarUpdate,
66     UserClearPrivateMeta,
67     UserUpdatePrivateMeta,
68 )
69 from .resolvers import (
70     resolve_address,
71     resolve_address_validation_rules,
72     resolve_customers,
73     resolve_permission_groups,
74     resolve_service_accounts,
75     resolve_staff_users,
76     resolve_user,
77 )
78 from .sorters import (
79     PermissionGroupSortingInput,
80     ServiceAccountSortingInput,
81     UserSortingInput,
82 )
83 from .types import Address, AddressValidationData, Group, ServiceAccount, User
84 
85 
86 class CustomerFilterInput(FilterInputObjectType):
87     class Meta:
88         filterset_class = CustomerFilter
89 
90 
91 class PermissionGroupFilterInput(FilterInputObjectType):
92     class Meta:
93         filterset_class = PermissionGroupFilter
94 
95 
96 class StaffUserInput(FilterInputObjectType):
97     class Meta:
98         filterset_class = StaffUserFilter
99 
100 
101 class ServiceAccountFilterInput(FilterInputObjectType):
102     class Meta:
103         filterset_class = ServiceAccountFilter
104 
105 
106 class AccountQueries(graphene.ObjectType):
107     address_validation_rules = graphene.Field(
108         AddressValidationData,
109         description="Returns address validation rules.",
110         country_code=graphene.Argument(
111             CountryCodeEnum,
112             description="Two-letter ISO 3166-1 country code.",
113             required=True,
114         ),
115         country_area=graphene.Argument(
116             graphene.String, description="Designation of a region, province or state."
117         ),
118         city=graphene.Argument(graphene.String, description="City or a town name."),
119         city_area=graphene.Argument(
120             graphene.String, description="Sublocality like a district."
121         ),
122     )
123     address = graphene.Field(
124         Address,
125         id=graphene.Argument(
126             graphene.ID, description="ID of an address.", required=True
127         ),
128         description="Look up an address by ID.",
129     )
130     customers = FilterInputConnectionField(
131         User,
132         filter=CustomerFilterInput(description="Filtering options for customers."),
133         sort_by=UserSortingInput(description="Sort customers."),
134         description="List of the shop's customers.",
135     )
136     permission_groups = FilterInputConnectionField(
137         Group,
138         filter=PermissionGroupFilterInput(
139             description="Filtering options for permission groups."
140         ),
141         sort_by=PermissionGroupSortingInput(description="Sort permission groups."),
142         description="List of permission groups.",
143     )
144     permission_group = graphene.Field(
145         Group,
146         id=graphene.Argument(
147             graphene.ID, description="ID of the group.", required=True
148         ),
149         description="Look up permission group by ID.",
150     )
151     me = graphene.Field(User, description="Return the currently authenticated user.")
152     staff_users = FilterInputConnectionField(
153         User,
154         filter=StaffUserInput(description="Filtering options for staff users."),
155         sort_by=UserSortingInput(description="Sort staff users."),
156         description="List of the shop's staff users.",
157     )
158     service_accounts = FilterInputConnectionField(
159         ServiceAccount,
160         filter=ServiceAccountFilterInput(
161             description="Filtering options for service accounts."
162         ),
163         sort_by=ServiceAccountSortingInput(description="Sort service accounts."),
164         description="List of the service accounts.",
165     )
166     service_account = graphene.Field(
167         ServiceAccount,
168         id=graphene.Argument(
169             graphene.ID, description="ID of the service account.", required=True
170         ),
171         description="Look up a service account by ID.",
172     )
173 
174     user = graphene.Field(
175         User,
176         id=graphene.Argument(graphene.ID, description="ID of the user.", required=True),
177         description="Look up a user by ID.",
178     )
179 
180     def resolve_address_validation_rules(
181         self, info, country_code, country_area=None, city=None, city_area=None
182     ):
183         return resolve_address_validation_rules(
184             info,
185             country_code,
186             country_area=country_area,
187             city=city,
188             city_area=city_area,
189         )
190 
191     @permission_required(AccountPermissions.MANAGE_SERVICE_ACCOUNTS)
192     def resolve_service_accounts(self, info, **kwargs):
193         return resolve_service_accounts(info, **kwargs)
194 
195     @permission_required(AccountPermissions.MANAGE_SERVICE_ACCOUNTS)
196     def resolve_service_account(self, info, id):
197         return graphene.Node.get_node_from_global_id(info, id, ServiceAccount)
198 
199     @permission_required(AccountPermissions.MANAGE_USERS)
200     def resolve_customers(self, info, query=None, **kwargs):
201         return resolve_customers(info, query=query, **kwargs)
202 
203     @permission_required(AccountPermissions.MANAGE_STAFF)
204     def resolve_permission_groups(self, info, query=None, **kwargs):
205         return resolve_permission_groups(info, query=query, **kwargs)
206 
207     @permission_required(AccountPermissions.MANAGE_STAFF)
208     def resolve_permission_group(self, info, id):
209         return graphene.Node.get_node_from_global_id(info, id, Group)
210 
211     @login_required
212     def resolve_me(self, info):
213         return info.context.user
214 
215     @permission_required(AccountPermissions.MANAGE_STAFF)
216     def resolve_staff_users(self, info, query=None, **kwargs):
217         return resolve_staff_users(info, query=query, **kwargs)
218 
219     @one_of_permissions_required(
220         [AccountPermissions.MANAGE_STAFF, AccountPermissions.MANAGE_USERS]
221     )
222     def resolve_user(self, info, id):
223         return resolve_user(info, id)
224 
225     def resolve_address(self, info, id):
226         return resolve_address(info, id)
227 
228 
229 class AccountMutations(graphene.ObjectType):
230     # Base mutations
231     request_password_reset = RequestPasswordReset.Field()
232     confirm_account = ConfirmAccount.Field()
233     set_password = SetPassword.Field()
234     password_change = PasswordChange.Field()
235     request_email_change = RequestEmailChange.Field()
236     confirm_email_change = ConfirmEmailChange.Field()
237 
238     # Account mutations
239     account_address_create = AccountAddressCreate.Field()
240     account_address_update = AccountAddressUpdate.Field()
241     account_address_delete = AccountAddressDelete.Field()
242     account_set_default_address = AccountSetDefaultAddress.Field()
243 
244     account_register = AccountRegister.Field()
245     account_update = AccountUpdate.Field()
246     account_request_deletion = AccountRequestDeletion.Field()
247     account_delete = AccountDelete.Field()
248 
249     account_update_meta = AccountUpdateMeta.Field()
250 
251     # Staff mutations
252     address_create = AddressCreate.Field()
253     address_update = AddressUpdate.Field()
254     address_delete = AddressDelete.Field()
255     address_set_default = AddressSetDefault.Field()
256 
257     customer_create = CustomerCreate.Field()
258     customer_update = CustomerUpdate.Field()
259     customer_delete = CustomerDelete.Field()
260     customer_bulk_delete = CustomerBulkDelete.Field()
261 
262     staff_create = StaffCreate.Field()
263     staff_update = StaffUpdate.Field()
264     staff_delete = StaffDelete.Field()
265     staff_bulk_delete = StaffBulkDelete.Field()
266 
267     user_avatar_update = UserAvatarUpdate.Field()
268     user_avatar_delete = UserAvatarDelete.Field()
269     user_bulk_set_active = UserBulkSetActive.Field()
270 
271     user_update_metadata = UserUpdateMeta.Field()
272     user_clear_metadata = UserClearMeta.Field()
273 
274     user_update_private_metadata = UserUpdatePrivateMeta.Field()
275     user_clear_private_metadata = UserClearPrivateMeta.Field()
276 
277     service_account_create = ServiceAccountCreate.Field()
278     service_account_update = ServiceAccountUpdate.Field()
279     service_account_delete = ServiceAccountDelete.Field()
280 
281     service_account_update_private_metadata = ServiceAccountUpdatePrivateMeta.Field()
282     service_account_clear_private_metadata = ServiceAccountClearPrivateMeta.Field()
283 
284     service_account_token_create = ServiceAccountTokenCreate.Field()
285     service_account_token_delete = ServiceAccountTokenDelete.Field()
286 
287     # Permission group mutations
288     permission_group_create = PermissionGroupCreate.Field()
289     permission_group_update = PermissionGroupUpdate.Field()
290     permission_group_delete = PermissionGroupDelete.Field()
291     permission_group_assign_users = PermissionGroupAssignUsers.Field()
292     permission_group_unassign_users = PermissionGroupUnassignUsers.Field()
293
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/saleor/graphql/account/schema.py b/saleor/graphql/account/schema.py
--- a/saleor/graphql/account/schema.py
+++ b/saleor/graphql/account/schema.py
@@ -1,5 +1,4 @@
 import graphene
-from graphql_jwt.decorators import login_required
 
 from ...core.permissions import AccountPermissions
 from ..core.fields import FilterInputConnectionField
@@ -208,9 +207,9 @@
     def resolve_permission_group(self, info, id):
         return graphene.Node.get_node_from_global_id(info, id, Group)
 
-    @login_required
     def resolve_me(self, info):
-        return info.context.user
+        user = info.context.user
+        return user if user.is_authenticated else None
 
     @permission_required(AccountPermissions.MANAGE_STAFF)
     def resolve_staff_users(self, info, query=None, **kwargs):

{"golden_diff": "diff --git a/saleor/graphql/account/schema.py b/saleor/graphql/account/schema.py\n--- a/saleor/graphql/account/schema.py\n+++ b/saleor/graphql/account/schema.py\n@@ -1,5 +1,4 @@\n import graphene\n-from graphql_jwt.decorators import login_required\n \n from ...core.permissions import AccountPermissions\n from ..core.fields import FilterInputConnectionField\n@@ -208,9 +207,9 @@\n     def resolve_permission_group(self, info, id):\n         return graphene.Node.get_node_from_global_id(info, id, Group)\n \n-    @login_required\n     def resolve_me(self, info):\n-        return info.context.user\n+        user = info.context.user\n+        return user if user.is_authenticated else None\n \n     @permission_required(AccountPermissions.MANAGE_STAFF)\n     def resolve_staff_users(self, info, query=None, **kwargs):\n", "issue": "graphql_jwt.exceptions.PermissionDenied: You do not have permission to perform this action\n### I want to deploy full saleor store(saleor/saleor-dashboard/saleor-storefront) with docker but i catught and expection that means have no permissn to query in graphql api and storefront cant load the main site.\r\n\u2026\r\n\r\n### Steps to reproduce the problem\r\n1. git clone https://github.com/mirumee/saleor.git\r\n2. cd saleor\r\n3. docker-compose build\r\n4. And continue to see in accordance with the documentation\r\n![Screenshot from 2019-12-25 16-32-56](https://user-images.githubusercontent.com/22658149/71446013-405f6e00-2734-11ea-8e1c-04d57c7df0ab.png)\r\n\r\n### What I expected to happen\r\nload normally the site like before.\r\n\r\n### Screenshots\r\n![Screenshot from 2019-12-25 16-28-55](https://user-images.githubusercontent.com/22658149/71445965-dd6dd700-2733-11ea-9fc0-c9e76c8f3595.png)\r\n\r\n**System information**\r\nOperating system:\r\nubuntu 18:04\n", "before_files": [{"content": "import graphene\nfrom graphql_jwt.decorators import login_required\n\nfrom ...core.permissions import AccountPermissions\nfrom ..core.fields import FilterInputConnectionField\nfrom ..core.types import FilterInputObjectType\nfrom ..decorators import one_of_permissions_required, permission_required\nfrom .bulk_mutations import CustomerBulkDelete, StaffBulkDelete, UserBulkSetActive\nfrom .enums import CountryCodeEnum\nfrom .filters import (\n    CustomerFilter,\n    PermissionGroupFilter,\n    ServiceAccountFilter,\n    StaffUserFilter,\n)\nfrom .mutations.account import (\n    AccountAddressCreate,\n    AccountAddressDelete,\n    AccountAddressUpdate,\n    AccountDelete,\n    AccountRegister,\n    AccountRequestDeletion,\n    AccountSetDefaultAddress,\n    AccountUpdate,\n    AccountUpdateMeta,\n    ConfirmEmailChange,\n    RequestEmailChange,\n)\nfrom .mutations.base import (\n    ConfirmAccount,\n    PasswordChange,\n    RequestPasswordReset,\n    SetPassword,\n    UserClearMeta,\n    UserUpdateMeta,\n)\nfrom .mutations.permission_group import (\n    PermissionGroupAssignUsers,\n    PermissionGroupCreate,\n    PermissionGroupDelete,\n    PermissionGroupUnassignUsers,\n    PermissionGroupUpdate,\n)\nfrom .mutations.service_account import (\n    ServiceAccountClearPrivateMeta,\n    ServiceAccountCreate,\n    ServiceAccountDelete,\n    ServiceAccountTokenCreate,\n    ServiceAccountTokenDelete,\n    ServiceAccountUpdate,\n    ServiceAccountUpdatePrivateMeta,\n)\nfrom .mutations.staff import (\n    AddressCreate,\n    AddressDelete,\n    AddressSetDefault,\n    AddressUpdate,\n    CustomerCreate,\n    CustomerDelete,\n    CustomerUpdate,\n    StaffCreate,\n    StaffDelete,\n    StaffUpdate,\n    UserAvatarDelete,\n    UserAvatarUpdate,\n    UserClearPrivateMeta,\n    UserUpdatePrivateMeta,\n)\nfrom .resolvers import (\n    resolve_address,\n    resolve_address_validation_rules,\n    resolve_customers,\n    resolve_permission_groups,\n    resolve_service_accounts,\n    resolve_staff_users,\n    resolve_user,\n)\nfrom .sorters import (\n    PermissionGroupSortingInput,\n    ServiceAccountSortingInput,\n    UserSortingInput,\n)\nfrom .types import Address, AddressValidationData, Group, ServiceAccount, User\n\n\nclass CustomerFilterInput(FilterInputObjectType):\n    class Meta:\n        filterset_class = CustomerFilter\n\n\nclass PermissionGroupFilterInput(FilterInputObjectType):\n    class Meta:\n        filterset_class = PermissionGroupFilter\n\n\nclass StaffUserInput(FilterInputObjectType):\n    class Meta:\n        filterset_class = StaffUserFilter\n\n\nclass ServiceAccountFilterInput(FilterInputObjectType):\n    class Meta:\n        filterset_class = ServiceAccountFilter\n\n\nclass AccountQueries(graphene.ObjectType):\n    address_validation_rules = graphene.Field(\n        AddressValidationData,\n        description=\"Returns address validation rules.\",\n        country_code=graphene.Argument(\n            CountryCodeEnum,\n            description=\"Two-letter ISO 3166-1 country code.\",\n            required=True,\n        ),\n        country_area=graphene.Argument(\n            graphene.String, description=\"Designation of a region, province or state.\"\n        ),\n        city=graphene.Argument(graphene.String, description=\"City or a town name.\"),\n        city_area=graphene.Argument(\n            graphene.String, description=\"Sublocality like a district.\"\n        ),\n    )\n    address = graphene.Field(\n        Address,\n        id=graphene.Argument(\n            graphene.ID, description=\"ID of an address.\", required=True\n        ),\n        description=\"Look up an address by ID.\",\n    )\n    customers = FilterInputConnectionField(\n        User,\n        filter=CustomerFilterInput(description=\"Filtering options for customers.\"),\n        sort_by=UserSortingInput(description=\"Sort customers.\"),\n        description=\"List of the shop's customers.\",\n    )\n    permission_groups = FilterInputConnectionField(\n        Group,\n        filter=PermissionGroupFilterInput(\n            description=\"Filtering options for permission groups.\"\n        ),\n        sort_by=PermissionGroupSortingInput(description=\"Sort permission groups.\"),\n        description=\"List of permission groups.\",\n    )\n    permission_group = graphene.Field(\n        Group,\n        id=graphene.Argument(\n            graphene.ID, description=\"ID of the group.\", required=True\n        ),\n        description=\"Look up permission group by ID.\",\n    )\n    me = graphene.Field(User, description=\"Return the currently authenticated user.\")\n    staff_users = FilterInputConnectionField(\n        User,\n        filter=StaffUserInput(description=\"Filtering options for staff users.\"),\n        sort_by=UserSortingInput(description=\"Sort staff users.\"),\n        description=\"List of the shop's staff users.\",\n    )\n    service_accounts = FilterInputConnectionField(\n        ServiceAccount,\n        filter=ServiceAccountFilterInput(\n            description=\"Filtering options for service accounts.\"\n        ),\n        sort_by=ServiceAccountSortingInput(description=\"Sort service accounts.\"),\n        description=\"List of the service accounts.\",\n    )\n    service_account = graphene.Field(\n        ServiceAccount,\n        id=graphene.Argument(\n            graphene.ID, description=\"ID of the service account.\", required=True\n        ),\n        description=\"Look up a service account by ID.\",\n    )\n\n    user = graphene.Field(\n        User,\n        id=graphene.Argument(graphene.ID, description=\"ID of the user.\", required=True),\n        description=\"Look up a user by ID.\",\n    )\n\n    def resolve_address_validation_rules(\n        self, info, country_code, country_area=None, city=None, city_area=None\n    ):\n        return resolve_address_validation_rules(\n            info,\n            country_code,\n            country_area=country_area,\n            city=city,\n            city_area=city_area,\n        )\n\n    @permission_required(AccountPermissions.MANAGE_SERVICE_ACCOUNTS)\n    def resolve_service_accounts(self, info, **kwargs):\n        return resolve_service_accounts(info, **kwargs)\n\n    @permission_required(AccountPermissions.MANAGE_SERVICE_ACCOUNTS)\n    def resolve_service_account(self, info, id):\n        return graphene.Node.get_node_from_global_id(info, id, ServiceAccount)\n\n    @permission_required(AccountPermissions.MANAGE_USERS)\n    def resolve_customers(self, info, query=None, **kwargs):\n        return resolve_customers(info, query=query, **kwargs)\n\n    @permission_required(AccountPermissions.MANAGE_STAFF)\n    def resolve_permission_groups(self, info, query=None, **kwargs):\n        return resolve_permission_groups(info, query=query, **kwargs)\n\n    @permission_required(AccountPermissions.MANAGE_STAFF)\n    def resolve_permission_group(self, info, id):\n        return graphene.Node.get_node_from_global_id(info, id, Group)\n\n    @login_required\n    def resolve_me(self, info):\n        return info.context.user\n\n    @permission_required(AccountPermissions.MANAGE_STAFF)\n    def resolve_staff_users(self, info, query=None, **kwargs):\n        return resolve_staff_users(info, query=query, **kwargs)\n\n    @one_of_permissions_required(\n        [AccountPermissions.MANAGE_STAFF, AccountPermissions.MANAGE_USERS]\n    )\n    def resolve_user(self, info, id):\n        return resolve_user(info, id)\n\n    def resolve_address(self, info, id):\n        return resolve_address(info, id)\n\n\nclass AccountMutations(graphene.ObjectType):\n    # Base mutations\n    request_password_reset = RequestPasswordReset.Field()\n    confirm_account = ConfirmAccount.Field()\n    set_password = SetPassword.Field()\n    password_change = PasswordChange.Field()\n    request_email_change = RequestEmailChange.Field()\n    confirm_email_change = ConfirmEmailChange.Field()\n\n    # Account mutations\n    account_address_create = AccountAddressCreate.Field()\n    account_address_update = AccountAddressUpdate.Field()\n    account_address_delete = AccountAddressDelete.Field()\n    account_set_default_address = AccountSetDefaultAddress.Field()\n\n    account_register = AccountRegister.Field()\n    account_update = AccountUpdate.Field()\n    account_request_deletion = AccountRequestDeletion.Field()\n    account_delete = AccountDelete.Field()\n\n    account_update_meta = AccountUpdateMeta.Field()\n\n    # Staff mutations\n    address_create = AddressCreate.Field()\n    address_update = AddressUpdate.Field()\n    address_delete = AddressDelete.Field()\n    address_set_default = AddressSetDefault.Field()\n\n    customer_create = CustomerCreate.Field()\n    customer_update = CustomerUpdate.Field()\n    customer_delete = CustomerDelete.Field()\n    customer_bulk_delete = CustomerBulkDelete.Field()\n\n    staff_create = StaffCreate.Field()\n    staff_update = StaffUpdate.Field()\n    staff_delete = StaffDelete.Field()\n    staff_bulk_delete = StaffBulkDelete.Field()\n\n    user_avatar_update = UserAvatarUpdate.Field()\n    user_avatar_delete = UserAvatarDelete.Field()\n    user_bulk_set_active = UserBulkSetActive.Field()\n\n    user_update_metadata = UserUpdateMeta.Field()\n    user_clear_metadata = UserClearMeta.Field()\n\n    user_update_private_metadata = UserUpdatePrivateMeta.Field()\n    user_clear_private_metadata = UserClearPrivateMeta.Field()\n\n    service_account_create = ServiceAccountCreate.Field()\n    service_account_update = ServiceAccountUpdate.Field()\n    service_account_delete = ServiceAccountDelete.Field()\n\n    service_account_update_private_metadata = ServiceAccountUpdatePrivateMeta.Field()\n    service_account_clear_private_metadata = ServiceAccountClearPrivateMeta.Field()\n\n    service_account_token_create = ServiceAccountTokenCreate.Field()\n    service_account_token_delete = ServiceAccountTokenDelete.Field()\n\n    # Permission group mutations\n    permission_group_create = PermissionGroupCreate.Field()\n    permission_group_update = PermissionGroupUpdate.Field()\n    permission_group_delete = PermissionGroupDelete.Field()\n    permission_group_assign_users = PermissionGroupAssignUsers.Field()\n    permission_group_unassign_users = PermissionGroupUnassignUsers.Field()\n", "path": "saleor/graphql/account/schema.py"}], "after_files": [{"content": "import graphene\n\nfrom ...core.permissions import AccountPermissions\nfrom ..core.fields import FilterInputConnectionField\nfrom ..core.types import FilterInputObjectType\nfrom ..decorators import one_of_permissions_required, permission_required\nfrom .bulk_mutations import CustomerBulkDelete, StaffBulkDelete, UserBulkSetActive\nfrom .enums import CountryCodeEnum\nfrom .filters import (\n    CustomerFilter,\n    PermissionGroupFilter,\n    ServiceAccountFilter,\n    StaffUserFilter,\n)\nfrom .mutations.account import (\n    AccountAddressCreate,\n    AccountAddressDelete,\n    AccountAddressUpdate,\n    AccountDelete,\n    AccountRegister,\n    AccountRequestDeletion,\n    AccountSetDefaultAddress,\n    AccountUpdate,\n    AccountUpdateMeta,\n    ConfirmEmailChange,\n    RequestEmailChange,\n)\nfrom .mutations.base import (\n    ConfirmAccount,\n    PasswordChange,\n    RequestPasswordReset,\n    SetPassword,\n    UserClearMeta,\n    UserUpdateMeta,\n)\nfrom .mutations.permission_group import (\n    PermissionGroupAssignUsers,\n    PermissionGroupCreate,\n    PermissionGroupDelete,\n    PermissionGroupUnassignUsers,\n    PermissionGroupUpdate,\n)\nfrom .mutations.service_account import (\n    ServiceAccountClearPrivateMeta,\n    ServiceAccountCreate,\n    ServiceAccountDelete,\n    ServiceAccountTokenCreate,\n    ServiceAccountTokenDelete,\n    ServiceAccountUpdate,\n    ServiceAccountUpdatePrivateMeta,\n)\nfrom .mutations.staff import (\n    AddressCreate,\n    AddressDelete,\n    AddressSetDefault,\n    AddressUpdate,\n    CustomerCreate,\n    CustomerDelete,\n    CustomerUpdate,\n    StaffCreate,\n    StaffDelete,\n    StaffUpdate,\n    UserAvatarDelete,\n    UserAvatarUpdate,\n    UserClearPrivateMeta,\n    UserUpdatePrivateMeta,\n)\nfrom .resolvers import (\n    resolve_address,\n    resolve_address_validation_rules,\n    resolve_customers,\n    resolve_permission_groups,\n    resolve_service_accounts,\n    resolve_staff_users,\n    resolve_user,\n)\nfrom .sorters import (\n    PermissionGroupSortingInput,\n    ServiceAccountSortingInput,\n    UserSortingInput,\n)\nfrom .types import Address, AddressValidationData, Group, ServiceAccount, User\n\n\nclass CustomerFilterInput(FilterInputObjectType):\n    class Meta:\n        filterset_class = CustomerFilter\n\n\nclass PermissionGroupFilterInput(FilterInputObjectType):\n    class Meta:\n        filterset_class = PermissionGroupFilter\n\n\nclass StaffUserInput(FilterInputObjectType):\n    class Meta:\n        filterset_class = StaffUserFilter\n\n\nclass ServiceAccountFilterInput(FilterInputObjectType):\n    class Meta:\n        filterset_class = ServiceAccountFilter\n\n\nclass AccountQueries(graphene.ObjectType):\n    address_validation_rules = graphene.Field(\n        AddressValidationData,\n        description=\"Returns address validation rules.\",\n        country_code=graphene.Argument(\n            CountryCodeEnum,\n            description=\"Two-letter ISO 3166-1 country code.\",\n            required=True,\n        ),\n        country_area=graphene.Argument(\n            graphene.String, description=\"Designation of a region, province or state.\"\n        ),\n        city=graphene.Argument(graphene.String, description=\"City or a town name.\"),\n        city_area=graphene.Argument(\n            graphene.String, description=\"Sublocality like a district.\"\n        ),\n    )\n    address = graphene.Field(\n        Address,\n        id=graphene.Argument(\n            graphene.ID, description=\"ID of an address.\", required=True\n        ),\n        description=\"Look up an address by ID.\",\n    )\n    customers = FilterInputConnectionField(\n        User,\n        filter=CustomerFilterInput(description=\"Filtering options for customers.\"),\n        sort_by=UserSortingInput(description=\"Sort customers.\"),\n        description=\"List of the shop's customers.\",\n    )\n    permission_groups = FilterInputConnectionField(\n        Group,\n        filter=PermissionGroupFilterInput(\n            description=\"Filtering options for permission groups.\"\n        ),\n        sort_by=PermissionGroupSortingInput(description=\"Sort permission groups.\"),\n        description=\"List of permission groups.\",\n    )\n    permission_group = graphene.Field(\n        Group,\n        id=graphene.Argument(\n            graphene.ID, description=\"ID of the group.\", required=True\n        ),\n        description=\"Look up permission group by ID.\",\n    )\n    me = graphene.Field(User, description=\"Return the currently authenticated user.\")\n    staff_users = FilterInputConnectionField(\n        User,\n        filter=StaffUserInput(description=\"Filtering options for staff users.\"),\n        sort_by=UserSortingInput(description=\"Sort staff users.\"),\n        description=\"List of the shop's staff users.\",\n    )\n    service_accounts = FilterInputConnectionField(\n        ServiceAccount,\n        filter=ServiceAccountFilterInput(\n            description=\"Filtering options for service accounts.\"\n        ),\n        sort_by=ServiceAccountSortingInput(description=\"Sort service accounts.\"),\n        description=\"List of the service accounts.\",\n    )\n    service_account = graphene.Field(\n        ServiceAccount,\n        id=graphene.Argument(\n            graphene.ID, description=\"ID of the service account.\", required=True\n        ),\n        description=\"Look up a service account by ID.\",\n    )\n\n    user = graphene.Field(\n        User,\n        id=graphene.Argument(graphene.ID, description=\"ID of the user.\", required=True),\n        description=\"Look up a user by ID.\",\n    )\n\n    def resolve_address_validation_rules(\n        self, info, country_code, country_area=None, city=None, city_area=None\n    ):\n        return resolve_address_validation_rules(\n            info,\n            country_code,\n            country_area=country_area,\n            city=city,\n            city_area=city_area,\n        )\n\n    @permission_required(AccountPermissions.MANAGE_SERVICE_ACCOUNTS)\n    def resolve_service_accounts(self, info, **kwargs):\n        return resolve_service_accounts(info, **kwargs)\n\n    @permission_required(AccountPermissions.MANAGE_SERVICE_ACCOUNTS)\n    def resolve_service_account(self, info, id):\n        return graphene.Node.get_node_from_global_id(info, id, ServiceAccount)\n\n    @permission_required(AccountPermissions.MANAGE_USERS)\n    def resolve_customers(self, info, query=None, **kwargs):\n        return resolve_customers(info, query=query, **kwargs)\n\n    @permission_required(AccountPermissions.MANAGE_STAFF)\n    def resolve_permission_groups(self, info, query=None, **kwargs):\n        return resolve_permission_groups(info, query=query, **kwargs)\n\n    @permission_required(AccountPermissions.MANAGE_STAFF)\n    def resolve_permission_group(self, info, id):\n        return graphene.Node.get_node_from_global_id(info, id, Group)\n\n    def resolve_me(self, info):\n        user = info.context.user\n        return user if user.is_authenticated else None\n\n    @permission_required(AccountPermissions.MANAGE_STAFF)\n    def resolve_staff_users(self, info, query=None, **kwargs):\n        return resolve_staff_users(info, query=query, **kwargs)\n\n    @one_of_permissions_required(\n        [AccountPermissions.MANAGE_STAFF, AccountPermissions.MANAGE_USERS]\n    )\n    def resolve_user(self, info, id):\n        return resolve_user(info, id)\n\n    def resolve_address(self, info, id):\n        return resolve_address(info, id)\n\n\nclass AccountMutations(graphene.ObjectType):\n    # Base mutations\n    request_password_reset = RequestPasswordReset.Field()\n    confirm_account = ConfirmAccount.Field()\n    set_password = SetPassword.Field()\n    password_change = PasswordChange.Field()\n    request_email_change = RequestEmailChange.Field()\n    confirm_email_change = ConfirmEmailChange.Field()\n\n    # Account mutations\n    account_address_create = AccountAddressCreate.Field()\n    account_address_update = AccountAddressUpdate.Field()\n    account_address_delete = AccountAddressDelete.Field()\n    account_set_default_address = AccountSetDefaultAddress.Field()\n\n    account_register = AccountRegister.Field()\n    account_update = AccountUpdate.Field()\n    account_request_deletion = AccountRequestDeletion.Field()\n    account_delete = AccountDelete.Field()\n\n    account_update_meta = AccountUpdateMeta.Field()\n\n    # Staff mutations\n    address_create = AddressCreate.Field()\n    address_update = AddressUpdate.Field()\n    address_delete = AddressDelete.Field()\n    address_set_default = AddressSetDefault.Field()\n\n    customer_create = CustomerCreate.Field()\n    customer_update = CustomerUpdate.Field()\n    customer_delete = CustomerDelete.Field()\n    customer_bulk_delete = CustomerBulkDelete.Field()\n\n    staff_create = StaffCreate.Field()\n    staff_update = StaffUpdate.Field()\n    staff_delete = StaffDelete.Field()\n    staff_bulk_delete = StaffBulkDelete.Field()\n\n    user_avatar_update = UserAvatarUpdate.Field()\n    user_avatar_delete = UserAvatarDelete.Field()\n    user_bulk_set_active = UserBulkSetActive.Field()\n\n    user_update_metadata = UserUpdateMeta.Field()\n    user_clear_metadata = UserClearMeta.Field()\n\n    user_update_private_metadata = UserUpdatePrivateMeta.Field()\n    user_clear_private_metadata = UserClearPrivateMeta.Field()\n\n    service_account_create = ServiceAccountCreate.Field()\n    service_account_update = ServiceAccountUpdate.Field()\n    service_account_delete = ServiceAccountDelete.Field()\n\n    service_account_update_private_metadata = ServiceAccountUpdatePrivateMeta.Field()\n    service_account_clear_private_metadata = ServiceAccountClearPrivateMeta.Field()\n\n    service_account_token_create = ServiceAccountTokenCreate.Field()\n    service_account_token_delete = ServiceAccountTokenDelete.Field()\n\n    # Permission group mutations\n    permission_group_create = PermissionGroupCreate.Field()\n    permission_group_update = PermissionGroupUpdate.Field()\n    permission_group_delete = PermissionGroupDelete.Field()\n    permission_group_assign_users = PermissionGroupAssignUsers.Field()\n    permission_group_unassign_users = PermissionGroupUnassignUsers.Field()\n", "path": "saleor/graphql/account/schema.py"}]}