@nocobase/acl 0.9.0-alpha.1 → 0.9.1-alpha.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.
Files changed (2) hide show
  1. package/lib/acl.js +11 -1
  2. package/package.json +4 -4
package/lib/acl.js CHANGED
@@ -181,7 +181,17 @@ class ACL extends _events().default {
181
181
  ((_ctx$log3 = ctx.log) === null || _ctx$log3 === void 0 ? void 0 : _ctx$log3.info) && ctx.log.info('acl parsedParams', parsedParams);
182
182
  ctx.permission.rawParams = _lodash().default.cloneDeep(resourcerAction.params);
183
183
  resourcerAction.mergeParams(parsedParams, {
184
- appends: (x, y) => _lodash().default.intersection(x, y)
184
+ appends: (x, y) => {
185
+ if (!x) {
186
+ return [];
187
+ }
188
+
189
+ if (!y) {
190
+ return x;
191
+ }
192
+
193
+ return x.filter(i => y.includes(i.split('.').shift()));
194
+ }
185
195
  });
186
196
  ctx.permission.mergedParams = _lodash().default.cloneDeep(resourcerAction.params);
187
197
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@nocobase/acl",
3
- "version": "0.9.0-alpha.1",
3
+ "version": "0.9.1-alpha.1",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./lib/index.js",
7
7
  "types": "./lib/index.d.ts",
8
8
  "dependencies": {
9
- "@nocobase/resourcer": "0.9.0-alpha.1",
10
- "@nocobase/utils": "0.9.0-alpha.1",
9
+ "@nocobase/resourcer": "0.9.1-alpha.1",
10
+ "@nocobase/utils": "0.9.1-alpha.1",
11
11
  "json-templates": "^4.2.0",
12
12
  "minimatch": "^5.1.1"
13
13
  },
@@ -16,5 +16,5 @@
16
16
  "url": "git+https://github.com/nocobase/nocobase.git",
17
17
  "directory": "packages/acl"
18
18
  },
19
- "gitHead": "d84c2a47c42c2ffec4fbf317d53268952fbd58d7"
19
+ "gitHead": "56cb184b00dc383b853015d525bf6e79dea92169"
20
20
  }