@tachybase/module-user 1.6.0 → 1.6.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/dist/externalVersion.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"react": "18.3.1",
|
|
3
|
-
"@tachybase/client": "1.6.
|
|
4
|
-
"@tachybase/schema": "1.
|
|
3
|
+
"@tachybase/client": "1.6.1",
|
|
4
|
+
"@tachybase/schema": "1.6.0-alpha.9",
|
|
5
5
|
"antd": "5.22.5",
|
|
6
|
-
"@tachybase/module-acl": "1.6.
|
|
7
|
-
"@tego/client": "1.
|
|
6
|
+
"@tachybase/module-acl": "1.6.1",
|
|
7
|
+
"@tego/client": "1.6.0-alpha.9",
|
|
8
8
|
"react-i18next": "16.2.1",
|
|
9
|
-
"@tego/server": "1.
|
|
9
|
+
"@tego/server": "1.6.0-alpha.9"
|
|
10
10
|
};
|
|
@@ -31,7 +31,7 @@ async function updateProfile(ctx, next) {
|
|
|
31
31
|
}
|
|
32
32
|
const UserRepo = ctx.db.getRepository("users");
|
|
33
33
|
if (values == null ? void 0 : values.code) {
|
|
34
|
-
const verificationPlugin = ctx.
|
|
34
|
+
const verificationPlugin = ctx.tego.getPlugin("otp");
|
|
35
35
|
try {
|
|
36
36
|
await verificationPlugin.intercept(ctx, async () => {
|
|
37
37
|
});
|
package/dist/server/server.js
CHANGED
|
@@ -183,7 +183,6 @@ class PluginUsersServer extends import_server.Plugin {
|
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
async load() {
|
|
186
|
-
await this.importCollections((0, import_node_path.resolve)(__dirname, "collections"));
|
|
187
186
|
this.db.addMigrations({
|
|
188
187
|
namespace: "users",
|
|
189
188
|
directory: (0, import_node_path.resolve)(__dirname, "migrations"),
|
|
@@ -201,7 +200,7 @@ class PluginUsersServer extends import_server.Plugin {
|
|
|
201
200
|
async (ctx, next) => {
|
|
202
201
|
await next();
|
|
203
202
|
const { associatedName, resourceName, actionName, values } = ctx.action.params;
|
|
204
|
-
const cache = ctx.
|
|
203
|
+
const cache = ctx.tego.cache;
|
|
205
204
|
if (associatedName === "roles" && resourceName === "users" && ["add", "remove", "set"].includes(actionName) && (values == null ? void 0 : values.length)) {
|
|
206
205
|
for (const userId of values) {
|
|
207
206
|
await cache.del(`roles:${userId}`);
|
|
@@ -210,7 +209,7 @@ class PluginUsersServer extends import_server.Plugin {
|
|
|
210
209
|
},
|
|
211
210
|
{ tag: "roleCacheInvalidation" }
|
|
212
211
|
);
|
|
213
|
-
const verificationPlugin = this.app.
|
|
212
|
+
const verificationPlugin = this.app.pm.get("otp");
|
|
214
213
|
if (!verificationPlugin) {
|
|
215
214
|
this.app.logger.warn("sms-auth: @tachybase/plugin-otp is required");
|
|
216
215
|
return;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/module-user",
|
|
3
3
|
"displayName": "Users",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.1",
|
|
5
5
|
"description": "Provides basic user model, as well as created by and updated by fields.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Users & permissions"
|
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
"main": "./dist/server/index.js",
|
|
11
11
|
"dependencies": {},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@tachybase/schema": "1.
|
|
14
|
-
"@tachybase/test": "1.
|
|
15
|
-
"@tego/client": "1.
|
|
16
|
-
"@tego/server": "1.
|
|
13
|
+
"@tachybase/schema": "1.6.0-alpha.9",
|
|
14
|
+
"@tachybase/test": "1.6.0-alpha.9",
|
|
15
|
+
"@tego/client": "1.6.0-alpha.9",
|
|
16
|
+
"@tego/server": "1.6.0-alpha.9",
|
|
17
17
|
"@types/jsonwebtoken": "^8.5.9",
|
|
18
18
|
"antd": "5.22.5",
|
|
19
19
|
"jsonwebtoken": "^8.5.1",
|
|
20
20
|
"react-i18next": "16.2.1",
|
|
21
|
-
"@tachybase/
|
|
22
|
-
"@tachybase/module-auth": "1.6.
|
|
23
|
-
"@tachybase/
|
|
21
|
+
"@tachybase/client": "1.6.1",
|
|
22
|
+
"@tachybase/module-auth": "1.6.1",
|
|
23
|
+
"@tachybase/module-acl": "1.6.1"
|
|
24
24
|
},
|
|
25
25
|
"description.zh-CN": "提供了基础的用户模型,以及创建人和最后更新人字段。",
|
|
26
26
|
"displayName.zh-CN": "用户",
|