Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
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.pyindex affb910a78..7fd28119a0 100644--- a/saleor/graphql/core/mutations.py+++ b/saleor/graphql/core/mutations.py@@ -274,6 +274,7 @@ class BaseMutation(graphene.Mutation):return Trueservice_account = getattr(context, "service_account", None)if service_account:+ # for now MANAGE_STAFF permission for service account is not supportedif AccountPermissions.MANAGE_STAFF in permissions:return Falsereturn service_account.has_perms(permissions)diff --git a/saleor/graphql/decorators.py b/saleor/graphql/decorators.pyindex 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 Trueservice_account = getattr(context, "service_account", None)if service_account:+ # for now MANAGE_STAFF permission for service account is not supportedif AccountPermissions.MANAGE_STAFF in perms:return Falsereturn service_account.has_perms(perms)