@tinycloud/node-sdk 3.9.0-beta.8 → 3.9.1-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 +2 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +2 -1
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/core.js
CHANGED
|
@@ -390,6 +390,7 @@ function pkhSpaceIdentity(spaceId) {
|
|
|
390
390
|
}
|
|
391
391
|
var DECRYPT_ACTION = ENCRYPTION.DECRYPT;
|
|
392
392
|
var NETWORK_CREATE_ACTION = ENCRYPTION.NETWORK_CREATE;
|
|
393
|
+
var KEY_CREATE_ACTION = "tinycloud.encryption/key.create";
|
|
393
394
|
function describeHostFailure(result) {
|
|
394
395
|
const text = result.error?.trim();
|
|
395
396
|
return text ? `${result.status} - ${text}` : `${result.status}`;
|
|
@@ -1031,7 +1032,7 @@ var NodeUserAuthorization = class {
|
|
|
1031
1032
|
return true;
|
|
1032
1033
|
}
|
|
1033
1034
|
const parsed = entry.path.includes("/") ? parseEncryptionResource(entry.path) : { ...parseNetworkId(entry.path), kind: "network" };
|
|
1034
|
-
const sharePrefix = parsed.kind === "prefix" && parsed.network === "default" && parsed.prefix === "share" && entry.actions.length
|
|
1035
|
+
const sharePrefix = parsed.kind === "prefix" && parsed.network === "default" && parsed.prefix === "share" && entry.actions.length > 0 && entry.actions.every((action) => action === DECRYPT_ACTION || action === KEY_CREATE_ACTION) && didPrincipalMatches(parsed.ownerDid, currentDid);
|
|
1035
1036
|
if (parsed.kind !== "network" && !sharePrefix) {
|
|
1036
1037
|
throw new ManifestValidationError("named keys go in manifest.keys");
|
|
1037
1038
|
}
|