@nocobase/acl 1.9.25 → 1.9.26

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.
@@ -56,7 +56,12 @@ const _SnippetManager = class _SnippetManager {
56
56
  if (snippet.name.includes("*") || snippet.name.endsWith(".")) {
57
57
  throw new Error(`Invalid snippet name: ${snippet.name}, name should not include * or end with dot.`);
58
58
  }
59
- this.snippets.set(snippet.name, snippet);
59
+ const existed = this.snippets.get(snippet.name);
60
+ if (existed) {
61
+ existed.actions = Array.from(/* @__PURE__ */ new Set([...existed.actions, ...snippet.actions]));
62
+ } else {
63
+ this.snippets.set(snippet.name, snippet);
64
+ }
60
65
  }
61
66
  allow(actionPath, snippetName) {
62
67
  const negated = snippetName.startsWith("!");
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@nocobase/acl",
3
- "version": "1.9.25",
3
+ "version": "1.9.26",
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.9.25",
10
- "@nocobase/utils": "1.9.25",
9
+ "@nocobase/resourcer": "1.9.26",
10
+ "@nocobase/utils": "1.9.26",
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": "263145e2a39b6c3a636168c0bb574c9f44af8398"
18
+ "gitHead": "794e25d4aca20fbc68769ad7b1266860bd45ac5c"
19
19
  }