@nocobase/plugin-acl 2.1.0-beta.6 → 2.1.0-beta.8
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
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-beta.
|
|
11
|
+
"@nocobase/client": "2.1.0-beta.8",
|
|
12
12
|
"antd": "5.24.2",
|
|
13
13
|
"react": "18.2.0",
|
|
14
14
|
"react-i18next": "11.18.6",
|
|
@@ -17,13 +17,13 @@ module.exports = {
|
|
|
17
17
|
"@formily/react": "2.3.7",
|
|
18
18
|
"@ant-design/icons": "5.6.1",
|
|
19
19
|
"lodash": "4.17.21",
|
|
20
|
-
"@nocobase/utils": "2.1.0-beta.
|
|
21
|
-
"@nocobase/actions": "2.1.0-beta.
|
|
22
|
-
"@nocobase/cache": "2.1.0-beta.
|
|
23
|
-
"@nocobase/database": "2.1.0-beta.
|
|
24
|
-
"@nocobase/server": "2.1.0-beta.
|
|
25
|
-
"@nocobase/acl": "2.1.0-beta.
|
|
26
|
-
"@nocobase/test": "2.1.0-beta.
|
|
20
|
+
"@nocobase/utils": "2.1.0-beta.8",
|
|
21
|
+
"@nocobase/actions": "2.1.0-beta.8",
|
|
22
|
+
"@nocobase/cache": "2.1.0-beta.8",
|
|
23
|
+
"@nocobase/database": "2.1.0-beta.8",
|
|
24
|
+
"@nocobase/server": "2.1.0-beta.8",
|
|
25
|
+
"@nocobase/acl": "2.1.0-beta.8",
|
|
26
|
+
"@nocobase/test": "2.1.0-beta.8",
|
|
27
27
|
"@formily/core": "2.3.7",
|
|
28
28
|
"@formily/antd-v5": "1.2.3",
|
|
29
29
|
"antd-style": "3.7.1"
|
|
@@ -100,7 +100,7 @@ const checkChangesWithAssociation = async (ctx, next) => {
|
|
|
100
100
|
const acl = ctx.acl;
|
|
101
101
|
for (const role of roles) {
|
|
102
102
|
const aclRole = acl.getRole(role);
|
|
103
|
-
if (aclRole.snippetAllowed(`${resourceName}:${actionName}`)) {
|
|
103
|
+
if (aclRole == null ? void 0 : aclRole.snippetAllowed(`${resourceName}:${actionName}`)) {
|
|
104
104
|
return next();
|
|
105
105
|
}
|
|
106
106
|
}
|
|
@@ -71,7 +71,11 @@ function createWithACLMetaMiddleware() {
|
|
|
71
71
|
if (collection.isMultiFilterTargetKey()) {
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const filterTargetKey = collection.filterTargetKey;
|
|
75
|
+
if (!filterTargetKey || typeof filterTargetKey !== "string") {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const primaryKeyField = filterTargetKey;
|
|
75
79
|
let listData;
|
|
76
80
|
if ((_a = ctx.body) == null ? void 0 : _a.data) {
|
|
77
81
|
listData = ctx.data;
|
|
@@ -90,7 +94,8 @@ function createWithACLMetaMiddleware() {
|
|
|
90
94
|
const actionsParams = [];
|
|
91
95
|
for (const action of inspectActions) {
|
|
92
96
|
const actionCtx = {
|
|
93
|
-
db,
|
|
97
|
+
db: ctx.db,
|
|
98
|
+
database: db,
|
|
94
99
|
get: () => {
|
|
95
100
|
return void 0;
|
|
96
101
|
},
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "Based on roles, resources, and actions, access control can precisely manage interface configuration permissions, data operation permissions, menu access permissions, and plugin permissions.",
|
|
7
7
|
"description.ru-RU": "На основе ролей, ресурсов и действий система контроля доступа может точно управлять разрешениями на изменение интерфейса, работу с данными, доступ к меню и разрешениями для подключаемых модулей.",
|
|
8
8
|
"description.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。",
|
|
9
|
-
"version": "2.1.0-beta.
|
|
9
|
+
"version": "2.1.0-beta.8",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "./dist/server/index.js",
|
|
12
12
|
"homepage": "https://docs.nocobase.com/handbook/acl",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
45
45
|
"directory": "packages/plugins/acl"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "5099d561c5467292414c1e77ad6bad3730d97344"
|
|
48
48
|
}
|