@abtnode/constant 1.16.29-beta-e04c6f40 → 1.16.29-beta-88bdefe8
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/index.js +15 -0
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -30,6 +30,10 @@ const SERVER_ROLES = Object.freeze({
|
|
|
30
30
|
EXTERNAL_BLOCKLETS_MANAGER: 'external-blocklets-manager',
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
+
const SERVICES_ROLES = Object.freeze({
|
|
34
|
+
BLOCKLET_GUEST: 'blocklet-guest',
|
|
35
|
+
});
|
|
36
|
+
|
|
33
37
|
const BLOCKLET_ROLES = [
|
|
34
38
|
SERVER_ROLES.BLOCKLET_OWNER,
|
|
35
39
|
SERVER_ROLES.BLOCKLET_ADMIN,
|
|
@@ -39,6 +43,16 @@ const BLOCKLET_ROLES = [
|
|
|
39
43
|
|
|
40
44
|
const isBlockletRole = (role) => role && BLOCKLET_ROLES.includes(role);
|
|
41
45
|
|
|
46
|
+
const BLOCKLET_MULTIPLE_TENANT_ROLES = [
|
|
47
|
+
SERVER_ROLES.BLOCKLET_OWNER,
|
|
48
|
+
SERVER_ROLES.BLOCKLET_ADMIN,
|
|
49
|
+
SERVER_ROLES.BLOCKLET_MEMBER,
|
|
50
|
+
SERVER_ROLES.BLOCKLET_SDK,
|
|
51
|
+
SERVICES_ROLES.BLOCKLET_GUEST,
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
const isBlockletMultipleTenantRole = (role) => role && BLOCKLET_MULTIPLE_TENANT_ROLES.includes(role);
|
|
55
|
+
|
|
42
56
|
const AUTH_CERT_TYPE = {
|
|
43
57
|
USER: 'user',
|
|
44
58
|
OWNERSHIP_NFT: 'ownership_nft',
|
|
@@ -554,6 +568,7 @@ module.exports = Object.freeze({
|
|
|
554
568
|
SERVER_ROLES,
|
|
555
569
|
BLOCKLET_ROLES,
|
|
556
570
|
isBlockletRole,
|
|
571
|
+
isBlockletMultipleTenantRole,
|
|
557
572
|
AUTH_CERT_TYPE,
|
|
558
573
|
RBAC_CONFIG,
|
|
559
574
|
genPermissionName: (resource, action = 'access') => `${action}_${resource.replace('_', '-')}`, // resource cannot include '_'
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.29-beta-
|
|
6
|
+
"version": "1.16.29-beta-88bdefe8",
|
|
7
7
|
"description": "ABT Node constants",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"files": [
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"jest": "^29.7.0"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "2a91288d21c8defe019e1debfc242b6ef708573e"
|
|
24
24
|
}
|