kuzzle 2.50.2 → 2.50.3

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.
@@ -320,9 +320,12 @@ class HotelClerk {
320
320
  for (const [index, collections] of Object.entries(fullStateRooms)) {
321
321
  isAllowedRequest.input.resource.index = index;
322
322
  const toRemove = [];
323
- for (const collection of Object.keys(collections)) {
323
+ const collectionNames = Object.keys(collections);
324
+ // Iterate from the end so we process the most recently added collections first
325
+ for (let i = collectionNames.length - 1; i >= 0; i--) {
326
+ const collection = collectionNames[i];
324
327
  isAllowedRequest.input.resource.collection = collection;
325
- if (!user.isActionAllowed(isAllowedRequest)) {
328
+ if (!(await user.isActionAllowed(isAllowedRequest))) {
326
329
  toRemove.push(collection);
327
330
  }
328
331
  }
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kuzzle",
3
3
  "author": "The Kuzzle Team <support@kuzzle.io>",
4
- "version": "2.50.2",
4
+ "version": "2.50.3",
5
5
  "description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
6
6
  "scripts": {
7
7
  "build": "rm -Rf ./dist && tsc && node ./bin/copy-protobuf.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kuzzle",
3
3
  "author": "The Kuzzle Team <support@kuzzle.io>",
4
- "version": "2.50.2",
4
+ "version": "2.50.3",
5
5
  "description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
6
6
  "scripts": {
7
7
  "build": "rm -Rf ./dist && tsc && node ./bin/copy-protobuf.js",