@pinelab/vendure-plugin-customer-managed-groups 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.5.1 (2025-03-11)
2
+
3
+ - Don't allow removing yourself from group
4
+
1
5
  # 1.5.0 (2024-12-19)
2
6
 
3
7
  - Update Vendure to 3.1.1
@@ -112,7 +112,7 @@ let CustomerManagedGroupsService = class CustomerManagedGroupsService {
112
112
  if (!customerToRemove) {
113
113
  throw new core_1.UserInputError(`Customer '${customerIdToRemove}' is not in your group`);
114
114
  }
115
- if (customer.id === customerIdToRemove) {
115
+ if ((0, core_1.idsAreEqual)(customer.id, customerToRemove.id)) {
116
116
  throw new core_1.UserInputError(`You cannot remove yourself from your group`);
117
117
  }
118
118
  customerManagedGroup =
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pinelab/vendure-plugin-customer-managed-groups",
3
- "version": "1.5.0",
4
- "description": "This plugin allows customer groups to have 'Group admins', that are allowed to fetch placed orders for everyone in the group.",
3
+ "version": "1.5.1",
4
+ "description": "Allow customer groups to have 'Group admins', that are allowed to fetch placed orders for everyone in the group.",
5
5
  "author": "Martijn van de Brug <martijn@pinelab.studio>",
6
6
  "homepage": "https://pinelab-plugins.com/",
7
7
  "repository": "https://github.com/Pinelab-studio/pinelab-vendure-plugins",
@@ -11,7 +11,7 @@
11
11
  "access": "public"
12
12
  },
13
13
  "engines": {
14
- "node": ">=16.0.0"
14
+ "node": ">=18.0.0"
15
15
  },
16
16
  "main": "dist/index.js",
17
17
  "types": "dist/index.d.ts",
@@ -26,5 +26,5 @@
26
26
  "test": "vitest run",
27
27
  "lint": "echo 'No linting configured'"
28
28
  },
29
- "gitHead": "9c5bcd59af3ebeb3287084e495d7c5c359cf5d40"
29
+ "gitHead": "062f10b3ccc5306b33c61809e2a45b56e0146acc"
30
30
  }