@nocobase/acl 3.0.0-alpha.1 → 3.0.0-alpha.12

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 +5 -0
  2. package/package.json +3 -3
package/lib/acl.js CHANGED
@@ -364,6 +364,11 @@ const _ACL = class _ACL extends import_events.default {
364
364
  const { resourceName, actionName } = ctx.permission;
365
365
  const permission = ctx.permission;
366
366
  ((_a = ctx.log) == null ? void 0 : _a.debug) && ctx.log.debug("ctx permission", permission);
367
+ if (["firstOrCreate", "updateOrCreate"].includes(actionName)) {
368
+ permission.deferred = true;
369
+ await next();
370
+ return;
371
+ }
367
372
  try {
368
373
  const result = await acl.resolvePermissionParams(ctx, {
369
374
  actionName,
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@nocobase/acl",
3
- "version": "3.0.0-alpha.1",
3
+ "version": "3.0.0-alpha.12",
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/utils": "3.0.0-alpha.1",
9
+ "@nocobase/utils": "3.0.0-alpha.12",
10
10
  "minimatch": "^5.1.1"
11
11
  },
12
12
  "peerDependencies": {
@@ -18,5 +18,5 @@
18
18
  "url": "git+https://github.com/nocobase/nocobase.git",
19
19
  "directory": "packages/acl"
20
20
  },
21
- "gitHead": "22d8be8ece179cfa5c8a4ebb2c896c92bd418e03"
21
+ "gitHead": "2ba035885741a9977d76bbabf8f2caf44b199139"
22
22
  }