@nocobase/plugin-users 0.9.0-alpha.2 → 0.9.1-alpha.1

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/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # users
2
+
3
+ English | [中文](./README.zh-CN.md)
4
+
5
+ ## 安装激活
6
+
7
+ 内置插件无需手动安装激活。
8
+
9
+ ## 使用方法
@@ -0,0 +1,9 @@
1
+ # users
2
+
3
+ [English](./README.md) | 中文
4
+
5
+ ## 安装激活
6
+
7
+ 内置插件无需手动安装激活。
8
+
9
+ ## 使用方法
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _default = {
8
+ namespace: 'users',
9
+ duplicator: 'optional',
8
10
  name: 'users',
9
11
  title: '{{t("Users")}}',
10
12
  sortable: 'sort',
package/lib/server.js CHANGED
@@ -273,6 +273,14 @@ class UsersPlugin extends _server().Plugin {
273
273
 
274
274
  const User = _this3.db.getCollection('users');
275
275
 
276
+ if (yield User.repository.findOne({
277
+ filter: {
278
+ email: rootEmail
279
+ }
280
+ })) {
281
+ return;
282
+ }
283
+
276
284
  const user = yield User.repository.create({
277
285
  values: {
278
286
  email: rootEmail,
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-users",
3
- "version": "0.9.0-alpha.2",
3
+ "version": "0.9.1-alpha.1",
4
4
  "description": "",
5
5
  "license": "AGPL-3.0",
6
6
  "main": "./lib/index.js",
7
7
  "types": "./lib/index.d.ts",
8
8
  "dependencies": {
9
- "@nocobase/actions": "0.9.0-alpha.2",
10
- "@nocobase/database": "0.9.0-alpha.2",
11
- "@nocobase/resourcer": "0.9.0-alpha.2",
12
- "@nocobase/server": "0.9.0-alpha.2",
13
- "@nocobase/utils": "0.9.0-alpha.2",
9
+ "@nocobase/actions": "0.9.1-alpha.1",
10
+ "@nocobase/database": "0.9.1-alpha.1",
11
+ "@nocobase/resourcer": "0.9.1-alpha.1",
12
+ "@nocobase/server": "0.9.1-alpha.1",
13
+ "@nocobase/utils": "0.9.1-alpha.1",
14
14
  "json-templates": "^4.2.0",
15
15
  "jsonwebtoken": "^8.5.1"
16
16
  },
17
17
  "devDependencies": {
18
- "@nocobase/test": "0.9.0-alpha.2",
18
+ "@nocobase/test": "0.9.1-alpha.1",
19
19
  "@types/jsonwebtoken": "^8.5.8"
20
20
  },
21
- "gitHead": "b8f76ad38e60e677c5bb4aab0a4cdb28d98a0f49"
21
+ "gitHead": "56cb184b00dc383b853015d525bf6e79dea92169"
22
22
  }