Skip to content

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

Add explenation for removing service account access to operations with manage staff

IKarbowiak7e8786c96271
diff --git a/saleor/graphql/core/mutations.py b/saleor/graphql/core/mutations.py
index affb910a78..7fd28119a0 100644
--- a/saleor/graphql/core/mutations.py
+++ b/saleor/graphql/core/mutations.py
@@ -274,6 +274,7 @@ class BaseMutation(graphene.Mutation):
return True
service_account = getattr(context, "service_account", None)
if service_account:
+ # for now MANAGE_STAFF permission for service account is not supported
if AccountPermissions.MANAGE_STAFF in permissions:
return False
return service_account.has_perms(permissions)
diff --git a/saleor/graphql/decorators.py b/saleor/graphql/decorators.py
index 92fee794ca..6209e7077d 100644
--- a/saleor/graphql/decorators.py
+++ b/saleor/graphql/decorators.py
@@ -29,6 +29,7 @@ def _permission_required(perms: Iterable[Enum], context):
return True
service_account = getattr(context, "service_account", None)
if service_account:
+ # for now MANAGE_STAFF permission for service account is not supported
if AccountPermissions.MANAGE_STAFF in perms:
return False
return service_account.has_perms(perms)