Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Allow to use apps in demo mode (#9742)
Maciej Korycinski9b951160f0a7
diff --git a/saleor/graphql/middleware.py b/saleor/graphql/middleware.pyindex 5b498e889d..68708a85b2 100644--- a/saleor/graphql/middleware.py+++ b/saleor/graphql/middleware.py@@ -40,6 +40,10 @@ class ReadOnlyMiddleware:if root_email and user_email == root_email:return next_(root, info, **kwargs)+ # Bypass authenticated app as to create an app, root user is required+ if request.app:+ return next_(root, info, **kwargs)+for selection in info.operation.selection_set.selections:selection_name = str(selection.name.value)blocked = selection_name not in ReadOnlyMiddleware.ALLOWED_MUTATIONS