@nocobase/plugin-acl 1.8.18 → 1.8.20
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": "1.8.
|
|
11
|
+
"@nocobase/client": "1.8.20",
|
|
12
12
|
"antd": "5.24.2",
|
|
13
13
|
"react": "18.2.0",
|
|
14
14
|
"react-i18next": "11.18.6",
|
|
@@ -17,14 +17,14 @@ module.exports = {
|
|
|
17
17
|
"@formily/react": "2.3.0",
|
|
18
18
|
"@ant-design/icons": "5.6.1",
|
|
19
19
|
"lodash": "4.17.21",
|
|
20
|
-
"@nocobase/utils": "1.8.
|
|
21
|
-
"@nocobase/actions": "1.8.
|
|
22
|
-
"@nocobase/cache": "1.8.
|
|
23
|
-
"@nocobase/database": "1.8.
|
|
24
|
-
"@nocobase/server": "1.8.
|
|
25
|
-
"@nocobase/test": "1.8.
|
|
20
|
+
"@nocobase/utils": "1.8.20",
|
|
21
|
+
"@nocobase/actions": "1.8.20",
|
|
22
|
+
"@nocobase/cache": "1.8.20",
|
|
23
|
+
"@nocobase/database": "1.8.20",
|
|
24
|
+
"@nocobase/server": "1.8.20",
|
|
25
|
+
"@nocobase/test": "1.8.20",
|
|
26
26
|
"@formily/core": "2.3.0",
|
|
27
27
|
"@formily/antd-v5": "1.2.3",
|
|
28
28
|
"antd-style": "3.7.1",
|
|
29
|
-
"@nocobase/acl": "1.8.
|
|
29
|
+
"@nocobase/acl": "1.8.20"
|
|
30
30
|
};
|
|
@@ -167,6 +167,9 @@ function createWithACLMetaMiddleware() {
|
|
|
167
167
|
...params,
|
|
168
168
|
context: actionCtx
|
|
169
169
|
});
|
|
170
|
+
const include = (0, import_database.filterIncludes)(queryParams.where, queryParams.include || [], {
|
|
171
|
+
underscored: db.options.underscored
|
|
172
|
+
});
|
|
170
173
|
const actionSql = ctx.db.sequelize.queryInterface.queryGenerator.selectQuery(
|
|
171
174
|
Model.getTableName(),
|
|
172
175
|
{
|
|
@@ -224,17 +227,18 @@ function createWithACLMetaMiddleware() {
|
|
|
224
227
|
conditions.push({
|
|
225
228
|
whereCase: "1=1",
|
|
226
229
|
action,
|
|
227
|
-
include:
|
|
230
|
+
include: []
|
|
228
231
|
});
|
|
229
232
|
} else {
|
|
230
233
|
const whereCase = actionSql.match(/WHERE (.*?);/)[1];
|
|
231
234
|
conditions.push({
|
|
232
235
|
whereCase,
|
|
233
236
|
action,
|
|
234
|
-
include
|
|
237
|
+
include
|
|
235
238
|
});
|
|
236
239
|
}
|
|
237
240
|
}
|
|
241
|
+
const finalIncludes = (0, import_database.mergeIncludes)(conditions.map((condition) => condition.include || []).flat());
|
|
238
242
|
const results = await collection.model.findAll({
|
|
239
243
|
where: {
|
|
240
244
|
[primaryKeyField]: ids
|
|
@@ -245,7 +249,7 @@ function createWithACLMetaMiddleware() {
|
|
|
245
249
|
return [ctx.db.sequelize.literal(`CASE WHEN ${condition.whereCase} THEN 1 ELSE 0 END`), condition.action];
|
|
246
250
|
})
|
|
247
251
|
],
|
|
248
|
-
include:
|
|
252
|
+
include: finalIncludes,
|
|
249
253
|
raw: true
|
|
250
254
|
});
|
|
251
255
|
const allowedActions = inspectActions.map((action) => {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "权限控制",
|
|
5
5
|
"description": "Based on roles, resources, and actions, access control can precisely manage interface configuration permissions, data operation permissions, menu access permissions, and plugin permissions.",
|
|
6
6
|
"description.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。",
|
|
7
|
-
"version": "1.8.
|
|
7
|
+
"version": "1.8.20",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/acl",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
34
34
|
"directory": "packages/plugins/acl"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "11fd72435f80231a0114de34e63259743d0a55c4"
|
|
37
37
|
}
|