@abtnode/auth 1.6.27 → 1.6.30

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.
Files changed (2) hide show
  1. package/lib/auth.js +10 -0
  2. package/package.json +11 -11
package/lib/auth.js CHANGED
@@ -301,6 +301,16 @@ const beforeInvitationRequest = async ({ node, teamDid, inviteId, locale = 'en'
301
301
  }[locale]
302
302
  );
303
303
  }
304
+
305
+ const count = await node.getUsersCount({ teamDid });
306
+ if (count === 0) {
307
+ throw new Error(
308
+ {
309
+ en: 'The Application has no owner attached',
310
+ zh: '应用未绑定所有者',
311
+ }[locale]
312
+ );
313
+ }
304
314
  };
305
315
 
306
316
  const createInvitationRequest = async ({ node, nodeInfo, teamDid, inviteId, locale = 'en' }) => {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.6.27",
6
+ "version": "1.6.30",
7
7
  "description": "Simple lib to manage auth in ABT Node",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -20,15 +20,15 @@
20
20
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
- "@abtnode/constant": "1.6.27",
24
- "@abtnode/logger": "1.6.27",
25
- "@abtnode/util": "1.6.27",
26
- "@arcblock/did": "^1.14.19",
27
- "@arcblock/vc": "^1.14.19",
28
- "@blocklet/meta": "1.6.27",
29
- "@ocap/mcrypto": "^1.14.19",
30
- "@ocap/util": "^1.14.19",
31
- "@ocap/wallet": "^1.14.19",
23
+ "@abtnode/constant": "1.6.30",
24
+ "@abtnode/logger": "1.6.30",
25
+ "@abtnode/util": "1.6.30",
26
+ "@arcblock/did": "^1.14.20",
27
+ "@arcblock/vc": "^1.14.20",
28
+ "@blocklet/meta": "1.6.30",
29
+ "@ocap/mcrypto": "^1.14.20",
30
+ "@ocap/util": "^1.14.20",
31
+ "@ocap/wallet": "^1.14.20",
32
32
  "axios": "^0.25.0",
33
33
  "joi": "^17.6.0",
34
34
  "jsonwebtoken": "^8.5.1",
@@ -39,5 +39,5 @@
39
39
  "devDependencies": {
40
40
  "jest": "^27.4.5"
41
41
  },
42
- "gitHead": "5ec2dbcfa7d9464c0430ea3112e4fe0fbab65414"
42
+ "gitHead": "d8ea64b807f7852186cd4bf544193496fbb31e7c"
43
43
  }