@nocobase/plugin-acl 1.2.26-alpha → 1.2.28-alpha

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.
@@ -8,24 +8,24 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.2.26-alpha",
11
+ "@nocobase/client": "1.2.28-alpha",
12
12
  "react": "18.2.0",
13
13
  "@formily/shared": "2.3.0",
14
14
  "antd": "5.12.8",
15
15
  "@formily/react": "2.3.0",
16
16
  "@ant-design/icons": "5.2.6",
17
17
  "react-i18next": "11.18.6",
18
- "@nocobase/utils": "1.2.26-alpha",
19
- "@nocobase/actions": "1.2.26-alpha",
20
- "@nocobase/cache": "1.2.26-alpha",
21
- "@nocobase/database": "1.2.26-alpha",
22
- "@nocobase/server": "1.2.26-alpha",
18
+ "@nocobase/utils": "1.2.28-alpha",
19
+ "@nocobase/actions": "1.2.28-alpha",
20
+ "@nocobase/cache": "1.2.28-alpha",
21
+ "@nocobase/database": "1.2.28-alpha",
22
+ "@nocobase/server": "1.2.28-alpha",
23
23
  "async-mutex": "0.3.2",
24
24
  "lodash": "4.17.21",
25
- "@nocobase/test": "1.2.26-alpha",
25
+ "@nocobase/test": "1.2.28-alpha",
26
26
  "@formily/core": "2.3.0",
27
27
  "ahooks": "3.7.8",
28
28
  "@formily/antd-v5": "1.1.9",
29
29
  "antd-style": "3.4.5",
30
- "@nocobase/acl": "1.2.26-alpha"
30
+ "@nocobase/acl": "1.2.28-alpha"
31
31
  };
@@ -210,12 +210,21 @@ function createWithACLMetaMiddleware() {
210
210
  },
211
211
  Model
212
212
  );
213
- const whereCase = actionSql.match(/WHERE (.*?);/)[1];
214
- conditions.push({
215
- whereCase,
216
- action,
217
- include: queryParams.include
218
- });
213
+ const whereCaseMatch = actionSql.match(/WHERE (.*?);/);
214
+ if (!whereCaseMatch) {
215
+ conditions.push({
216
+ whereCase: "1=1",
217
+ action,
218
+ include: queryParams.include
219
+ });
220
+ } else {
221
+ const whereCase = actionSql.match(/WHERE (.*?);/)[1];
222
+ conditions.push({
223
+ whereCase,
224
+ action,
225
+ include: queryParams.include
226
+ });
227
+ }
219
228
  }
220
229
  const results = await collection.model.findAll({
221
230
  where: {
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.2.26-alpha",
7
+ "version": "1.2.28-alpha",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/acl",
@@ -34,5 +34,5 @@
34
34
  "url": "git+https://github.com/nocobase/nocobase.git",
35
35
  "directory": "packages/plugins/acl"
36
36
  },
37
- "gitHead": "a463b25b4f7de08f71f43a22cb6171f0a58aa66a"
37
+ "gitHead": "ce330a303028bcbed5c8475ba6c232862a6cf00f"
38
38
  }