Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Merge branch 'master' into feature/permission-groups
IKarbowiak8065b8e027ce
diff --cc CHANGELOG.mdindex 8ba6bebd51,dfa606582a..46e325aa68--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -93,14 -85,16 +93,24 @@@ All notable, unreleased changes to thi- Add pagination tests - #5363 by @fowczarek- Add ability to assign multiple warehouses in mutations to create/update a shipping zone - #5399 by @fowczarek- Add filter by ids to warehouses query - #5414 by @fowczarek+- Allow assigning groups in staff mutations - #5418 by @IKarbowiak+- Add delete group restriction - #5424 by @IKarbowiak+- Add restrictions to delete users from group - #5438 by @IKarbowiak+- Add restriction to deactivating staff - #5449 by @IKarbowiak+- Add restriction to removing staff - #5450 by @IKarbowiak+- Add restriction to bulk staff delete mutation - #5456 by @IKarbowiak+- Exclude superuser from staff and groups restrictions - #5463 by @IKarbowiak+- Drop permissions input field from staff mutations - #5471 by @IKarbowiak+ - Add shipping rate price validation - #5411 by @kswiatek92+ - Remove unused settings and environment variables - #5420 by @maarcingebala+ - Add product price validation - #5413 by @kswiatek92+ - Add attribute validation to attributeAssign - #5423 by @kswiatek92+ - Add possibility to Update/Delete more than one item in metadata - #5446 by @koradon+ - Check if image exists before validating - #5425 by @kswiatek92+ - Fix warehouses query not working without id - #5441 by @koradon+ - Add accountErrors to CreateToken as a required field - #5437 by @koradon+ - Raise GraphQLError if filter has not valid IDs - #5460 by @gabmartinez+ - Fix missing accountError when JSONWebTokenError is raised in CreateToken - #5465 by @koradon## 2.9.0diff --cc saleor/account/error_codes.pyindex 7d493cf209,35989449d8..15693d5477--- a/saleor/account/error_codes.py+++ b/saleor/account/error_codes.py@@@ -14,11 -14,8 +14,12 @@@ class AccountErrorCode(Enum)GRAPHQL_ERROR = "graphql_error"INVALID = "invalid"INVALID_PASSWORD = "invalid_password"+ LEFT_NOT_MANAGEABLE_PERMISSION = "left_not_manageable_permission"+ INVALID_CREDENTIALS = "invalid_credentials"NOT_FOUND = "not_found"+ OUT_OF_SCOPE_USER = "out_of_scope_user"+ OUT_OF_SCOPE_GROUP = "out_of_scope_group"+ OUT_OF_SCOPE_PERMISSION = "out_of_scope_permission"PASSWORD_ENTIRELY_NUMERIC = "password_entirely_numeric"PASSWORD_TOO_COMMON = "password_too_common"PASSWORD_TOO_SHORT = "password_too_short"diff --cc saleor/graphql/core/types/common.pyindex 9ae3e877a0,d2c61de7b0..d6709ec43b--- a/saleor/graphql/core/types/common.py+++ b/saleor/graphql/core/types/common.py@@@ -14,7 -13,7 +13,8 @@@ from ..enums importPageErrorCode,PaymentErrorCode,PermissionEnum,+ PermissionGroupErrorCode,+ PluginErrorCode,ProductErrorCode,ShippingErrorCode,ShopErrorCode,@@@ -180,6 -139,25 +189,10 @@@ class WishlistError(Error)code = WishlistErrorCode(description="The error code.", required=True)+ class TranslationError(Error):+ code = TranslationErrorCode(description="The error code.", required=True)++-class LanguageDisplay(graphene.ObjectType):- code = LanguageCodeEnum(description="Language code.", required=True)- language = graphene.String(description="Language.", required=True)---class PermissionDisplay(graphene.ObjectType):- code = PermissionEnum(description="Internal code for permission.", required=True)- name = graphene.String(- description="Describe action(s) allowed to do by permission.", required=True- )-- class Meta:- description = "Represents a permission object in a friendly form."--class SeoInput(graphene.InputObjectType):title = graphene.String(description="SEO title.")description = graphene.String(description="SEO description.")diff --cc saleor/graphql/schema.graphqlindex f09b1f5a80,d007ad49b8..5dbe1bec28--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@@ -49,11 -49,8 +49,12 @@@ enum AccountErrorCodeGRAPHQL_ERRORINVALIDINVALID_PASSWORD+ LEFT_NOT_MANAGEABLE_PERMISSION+ INVALID_CREDENTIALSNOT_FOUND+ OUT_OF_SCOPE_USER+ OUT_OF_SCOPE_GROUP+ OUT_OF_SCOPE_PERMISSIONPASSWORD_ENTIRELY_NUMERICPASSWORD_TOO_COMMONPASSWORD_TOO_SHORT@@@ -3038,10 -3033,16 +3036,10 @@@ enum PermissionEnumMANAGE_CHECKOUTS}-type PermissionGroupAssignUsers {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes.")- group: Group- accountErrors: [AccountError!]!-}-type PermissionGroupCreate {- errors: [Error!]!+ errors: [Error!]! @deprecated(reason: "Use typed errors with error codes.")group: Group- accountErrors: [AccountError!]!+ permissionGroupErrors: [PermissionGroupError!]!}input PermissionGroupCreateInput {@@@ -3051,8 -3051,8 +3049,8 @@@}type PermissionGroupDelete {- errors: [Error!]!+ errors: [Error!]! @deprecated(reason: "Use typed errors with error codes.")- accountErrors: [AccountError!]!+ permissionGroupErrors: [PermissionGroupError!]!group: Group}@@@ -3088,18 -3074,16 +3086,18 @@@ input PermissionGroupSortingInputfield: PermissionGroupSortField!}-type PermissionGroupUnassignUsers {+type PermissionGroupUpdate {- errors: [Error!]!+ errors: [Error!]! @deprecated(reason: "Use typed errors with error codes.")group: Group- accountErrors: [AccountError!]!+ permissionGroupErrors: [PermissionGroupError!]!}-type PermissionGroupUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes.")- group: Group- accountErrors: [AccountError!]!+input PermissionGroupUpdateInput {+ name: String+ addPermissions: [PermissionEnum!]+ removePermissions: [PermissionEnum!]+ addUsers: [ID!]+ removeUsers: [ID!]}type Plugin implements Node {@@@ -4316,14 -4328,14 +4342,14 @@@ input SiteDomainInput}type StaffBulkDelete {- errors: [Error!]!+ errors: [Error!]! @deprecated(reason: "Use typed errors with error codes.")count: Int!- accountErrors: [AccountError!]!+ staffErrors: [StaffError!]!}type StaffCreate {- errors: [Error!]!+ errors: [Error!]! @deprecated(reason: "Use typed errors with error codes.")- accountErrors: [AccountError!]!+ staffErrors: [StaffError!]!user: User}@@@ -4338,8 -4350,8 +4364,8 @@@ input StaffCreateInput}type StaffDelete {- errors: [Error!]!+ errors: [Error!]! @deprecated(reason: "Use typed errors with error codes.")- accountErrors: [AccountError!]!+ staffErrors: [StaffError!]!user: User}@@@ -4389,8 -4401,8 +4415,8 @@@ type StaffNotificationRecipientUpdate}type StaffUpdate {- errors: [Error!]!+ errors: [Error!]! @deprecated(reason: "Use typed errors with error codes.")- accountErrors: [AccountError!]!+ staffErrors: [StaffError!]!user: User}