@nocobase/plugin-users 0.21.0-alpha.5 → 0.21.0-alpha.7

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.
@@ -1,15 +1,15 @@
1
1
  module.exports = {
2
2
  "react": "18.2.0",
3
3
  "antd": "5.12.8",
4
- "@nocobase/client": "0.21.0-alpha.5",
4
+ "@nocobase/client": "0.21.0-alpha.7",
5
5
  "@formily/react": "2.3.0",
6
6
  "@formily/core": "2.3.0",
7
- "@nocobase/plugin-acl": "0.21.0-alpha.5",
7
+ "@nocobase/plugin-acl": "0.21.0-alpha.7",
8
8
  "react-i18next": "11.18.6",
9
- "@nocobase/database": "0.21.0-alpha.5",
10
- "@nocobase/server": "0.21.0-alpha.5",
11
- "@nocobase/utils": "0.21.0-alpha.5",
12
- "@nocobase/cache": "0.21.0-alpha.5",
9
+ "@nocobase/database": "0.21.0-alpha.7",
10
+ "@nocobase/server": "0.21.0-alpha.7",
11
+ "@nocobase/utils": "0.21.0-alpha.7",
12
+ "@nocobase/cache": "0.21.0-alpha.7",
13
13
  "@formily/shared": "2.3.0",
14
- "@nocobase/actions": "0.21.0-alpha.5"
14
+ "@nocobase/actions": "0.21.0-alpha.7"
15
15
  };
@@ -81,7 +81,7 @@ var users_default = (0, import_database.defineCollection)({
81
81
  }
82
82
  },
83
83
  {
84
- interface: "phone",
84
+ interface: "input",
85
85
  type: "string",
86
86
  name: "phone",
87
87
  unique: true,
@@ -89,7 +89,6 @@ var users_default = (0, import_database.defineCollection)({
89
89
  type: "string",
90
90
  title: '{{t("Phone")}}',
91
91
  "x-component": "Input",
92
- "x-validator": "phone",
93
92
  required: true
94
93
  }
95
94
  },
@@ -0,0 +1,6 @@
1
+ import { Migration } from '@nocobase/server';
2
+ export default class extends Migration {
3
+ on: string;
4
+ appVersion: string;
5
+ up(): Promise<void>;
6
+ }
@@ -0,0 +1,53 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var update_phone_interface_exports = {};
19
+ __export(update_phone_interface_exports, {
20
+ default: () => update_phone_interface_default
21
+ });
22
+ module.exports = __toCommonJS(update_phone_interface_exports);
23
+ var import_server = require("@nocobase/server");
24
+ class update_phone_interface_default extends import_server.Migration {
25
+ on = "afterLoad";
26
+ // 'beforeLoad' or 'afterLoad'
27
+ appVersion = "<0.21.0-alpha.7";
28
+ async up() {
29
+ const Field = this.context.db.getRepository("fields");
30
+ const field = await Field.findOne({
31
+ filter: {
32
+ name: "phone",
33
+ collectionName: "users",
34
+ interface: "phone"
35
+ }
36
+ });
37
+ if (!field) {
38
+ return;
39
+ }
40
+ await field.update({
41
+ interface: "input",
42
+ options: {
43
+ ...field.options,
44
+ uiSchema: {
45
+ type: "string",
46
+ title: '{{t("Phone")}}',
47
+ "x-component": "Input",
48
+ required: true
49
+ }
50
+ }
51
+ });
52
+ }
53
+ }
@@ -138,7 +138,7 @@ class PluginUsersServer extends import_server.Plugin {
138
138
  loggedInActions.forEach((action) => this.app.acl.allow("users", action, "loggedIn"));
139
139
  this.app.acl.registerSnippet({
140
140
  name: `pm.${this.name}.*`,
141
- actions: ["users:listExcludeRole", "users:list"]
141
+ actions: ["users:*"]
142
142
  });
143
143
  }
144
144
  async load() {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "用户",
5
5
  "description": "Provides basic user model, as well as created by and updated by fields.",
6
6
  "description.zh-CN": "提供了基础的用户模型,以及创建人和最后更新人字段。",
7
- "version": "0.21.0-alpha.5",
7
+ "version": "0.21.0-alpha.7",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/users",
@@ -24,7 +24,7 @@
24
24
  "@nocobase/test": "0.x",
25
25
  "@nocobase/utils": "0.x"
26
26
  },
27
- "gitHead": "20ed1453da807587b0dc628d167c815156bf9ad4",
27
+ "gitHead": "b1be3993f8aa81173d01bc390aa8e4c5adcc0e2d",
28
28
  "keywords": [
29
29
  "Users & permissions"
30
30
  ]