@nocobase/acl 1.4.5 → 1.4.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.
- package/lib/acl.js +11 -0
- package/package.json +4 -4
package/lib/acl.js
CHANGED
|
@@ -360,6 +360,17 @@ const _ACL = class _ACL extends import_events.default {
|
|
|
360
360
|
ctx.permission.parsedParams = parsedParams;
|
|
361
361
|
((_d = ctx.log) == null ? void 0 : _d.debug) && ctx.log.debug("acl parsedParams", parsedParams);
|
|
362
362
|
ctx.permission.rawParams = import_lodash.default.cloneDeep(resourcerAction.params);
|
|
363
|
+
if (parsedParams.appends && resourcerAction.params.fields) {
|
|
364
|
+
for (const queryField of resourcerAction.params.fields) {
|
|
365
|
+
if (parsedParams.appends.indexOf(queryField) !== -1) {
|
|
366
|
+
if (!resourcerAction.params.appends) {
|
|
367
|
+
resourcerAction.params.appends = [];
|
|
368
|
+
}
|
|
369
|
+
resourcerAction.params.appends.push(queryField);
|
|
370
|
+
resourcerAction.params.fields = resourcerAction.params.fields.filter((f) => f !== queryField);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
363
374
|
resourcerAction.mergeParams(parsedParams, {
|
|
364
375
|
appends: /* @__PURE__ */ __name((x, y) => {
|
|
365
376
|
if (!x) {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/acl",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"main": "./lib/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@nocobase/resourcer": "1.4.
|
|
10
|
-
"@nocobase/utils": "1.4.
|
|
9
|
+
"@nocobase/resourcer": "1.4.7",
|
|
10
|
+
"@nocobase/utils": "1.4.7",
|
|
11
11
|
"minimatch": "^5.1.1"
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
16
16
|
"directory": "packages/acl"
|
|
17
17
|
},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "4f0829018bbf5c30408ee589da6d628c21281d4a"
|
|
19
19
|
}
|