@tachybase/module-ui-schema 0.23.58 → 1.0.18
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 +7 -7
- package/dist/server/server.js +1 -27
- package/package.json +11 -11
package/dist/externalVersion.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@tachybase/client": "0.
|
|
3
|
-
"@tachybase/database": "0.
|
|
4
|
-
"@tachybase/cache": "0.
|
|
5
|
-
"@tachybase/utils": "0.
|
|
2
|
+
"@tachybase/client": "1.0.18",
|
|
3
|
+
"@tachybase/database": "1.0.18",
|
|
4
|
+
"@tachybase/cache": "1.0.18",
|
|
5
|
+
"@tachybase/utils": "1.0.18",
|
|
6
6
|
"lodash": "4.17.21",
|
|
7
|
-
"@tachybase/server": "0.
|
|
8
|
-
"@tachybase/actions": "0.
|
|
9
|
-
"@tachybase/resourcer": "0.
|
|
7
|
+
"@tachybase/server": "1.0.18",
|
|
8
|
+
"@tachybase/actions": "1.0.18",
|
|
9
|
+
"@tachybase/resourcer": "1.0.18",
|
|
10
10
|
"sequelize": "6.37.5"
|
|
11
11
|
};
|
package/dist/server/server.js
CHANGED
|
@@ -51,7 +51,7 @@ class ModuleUiSchema extends import_server.Plugin {
|
|
|
51
51
|
this.app.db.registerModels({ MagicAttributeModel: import_database.MagicAttributeModel, UiSchemaModel: import_model.UiSchemaModel, ServerHookModel: import_model2.ServerHookModel });
|
|
52
52
|
this.registerRepository();
|
|
53
53
|
this.app.acl.registerSnippet({
|
|
54
|
-
name: `pm
|
|
54
|
+
name: `pm.ui-schema-storage.block-templates`,
|
|
55
55
|
actions: ["uiSchemaTemplates:*"]
|
|
56
56
|
});
|
|
57
57
|
this.app.acl.registerSnippet({
|
|
@@ -94,32 +94,6 @@ class ModuleUiSchema extends import_server.Plugin {
|
|
|
94
94
|
transaction
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
|
-
this.app.resourcer.use(
|
|
98
|
-
async (ctx, next) => {
|
|
99
|
-
var _a;
|
|
100
|
-
const { resourceName, actionName } = ctx.action.params;
|
|
101
|
-
if (resourceName === "uiSchemas" && actionName === "remove") {
|
|
102
|
-
const skip = await ctx.app.acl.allowManager.isAllowed(resourceName, actionName, ctx);
|
|
103
|
-
if (skip) {
|
|
104
|
-
return next();
|
|
105
|
-
}
|
|
106
|
-
const role = (_a = ctx == null ? void 0 : ctx.state) == null ? void 0 : _a.currentRole;
|
|
107
|
-
if (!role) {
|
|
108
|
-
ctx.throw(403, "No Permission: Role not found");
|
|
109
|
-
}
|
|
110
|
-
const aclRole = ctx.app.acl.roles.get(role);
|
|
111
|
-
if (!aclRole) {
|
|
112
|
-
ctx.throw(403, "No Permission: Role not found");
|
|
113
|
-
}
|
|
114
|
-
const snippetAllowed = aclRole.snippetAllowed(`${resourceName}:${actionName}`);
|
|
115
|
-
if (!snippetAllowed) {
|
|
116
|
-
ctx.throw(403, "No Permission: Role lacks remove permission for uiSchemas");
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
await next();
|
|
120
|
-
},
|
|
121
|
-
{ tag: "intercept-ui-schema-remove", after: "acl" }
|
|
122
|
-
);
|
|
123
97
|
this.app.resourcer.define({
|
|
124
98
|
name: "uiSchemas",
|
|
125
99
|
actions: import_ui_schema_action.uiSchemaActions
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/module-ui-schema",
|
|
3
3
|
"displayName": "UI schema storage",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "1.0.18",
|
|
5
5
|
"description": "Provides centralized UI schema storage service.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"System & security"
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"sequelize": "6.37.5"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@tachybase/actions": "0.
|
|
18
|
-
"@tachybase/
|
|
19
|
-
"@tachybase/database": "0.
|
|
20
|
-
"@tachybase/
|
|
21
|
-
"@tachybase/
|
|
22
|
-
"@tachybase/
|
|
23
|
-
"@tachybase/
|
|
24
|
-
"@tachybase/
|
|
25
|
-
"@tachybase/
|
|
26
|
-
"@tachybase/server": "0.
|
|
17
|
+
"@tachybase/actions": "1.0.18",
|
|
18
|
+
"@tachybase/cache": "1.0.18",
|
|
19
|
+
"@tachybase/database": "1.0.18",
|
|
20
|
+
"@tachybase/module-user": "1.0.18",
|
|
21
|
+
"@tachybase/client": "1.0.18",
|
|
22
|
+
"@tachybase/module-error-handler": "1.0.18",
|
|
23
|
+
"@tachybase/resourcer": "1.0.18",
|
|
24
|
+
"@tachybase/test": "1.0.18",
|
|
25
|
+
"@tachybase/utils": "1.0.18",
|
|
26
|
+
"@tachybase/server": "1.0.18"
|
|
27
27
|
},
|
|
28
28
|
"description.zh-CN": "提供中心化的 UI schema 存储服务。",
|
|
29
29
|
"displayName.zh-CN": "UI schema 存储服务",
|