@tinycloud/node-sdk 3.2.5 → 3.2.6-beta.0
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/dist/core.cjs +5 -2
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +5 -2
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/core.js
CHANGED
|
@@ -373,6 +373,9 @@ function addRawAbility(rawAbilities, resource, action) {
|
|
|
373
373
|
actions.push(action);
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
+
function primaryManifestSpace(resources) {
|
|
377
|
+
return resources.find((entry) => entry.space !== "account")?.space ?? resources[0]?.space ?? DEFAULT_MANIFEST_SPACE;
|
|
378
|
+
}
|
|
376
379
|
function cloneAbilitiesMap(actions) {
|
|
377
380
|
return Object.fromEntries(
|
|
378
381
|
Object.entries(actions).map(([service, paths]) => [
|
|
@@ -743,7 +746,7 @@ var NodeUserAuthorization = class {
|
|
|
743
746
|
const spaceResources = request.resources.filter(
|
|
744
747
|
(entry) => entry.service !== ENCRYPTION_PERMISSION_SERVICE
|
|
745
748
|
);
|
|
746
|
-
const primarySpaceName = spaceResources
|
|
749
|
+
const primarySpaceName = primaryManifestSpace(spaceResources);
|
|
747
750
|
const primarySpaceId = this.resolveSpaceName(
|
|
748
751
|
primarySpaceName,
|
|
749
752
|
address,
|
|
@@ -858,7 +861,7 @@ var NodeUserAuthorization = class {
|
|
|
858
861
|
}
|
|
859
862
|
return false;
|
|
860
863
|
});
|
|
861
|
-
const primarySpaceName = spaceResources
|
|
864
|
+
const primarySpaceName = primaryManifestSpace(spaceResources);
|
|
862
865
|
const primarySpaceId = this.resolveSpaceName(
|
|
863
866
|
primarySpaceName,
|
|
864
867
|
address,
|