@nocobase/plugin-data-visualization 1.2.14-alpha → 1.2.15-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,13 +8,13 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.2.14-alpha",
11
+ "@nocobase/client": "1.2.15-alpha",
12
12
  "dayjs": "1.11.10",
13
13
  "@formily/react": "2.3.0",
14
14
  "@formily/shared": "2.3.0",
15
15
  "lodash": "4.17.21",
16
- "@nocobase/cache": "1.2.14-alpha",
17
- "@nocobase/server": "1.2.14-alpha",
16
+ "@nocobase/cache": "1.2.15-alpha",
17
+ "@nocobase/server": "1.2.15-alpha",
18
18
  "react": "18.2.0",
19
19
  "@ant-design/icons": "5.2.6",
20
20
  "ahooks": "3.7.8",
@@ -22,9 +22,9 @@ module.exports = {
22
22
  "antd": "5.12.8",
23
23
  "@formily/antd-v5": "1.1.9",
24
24
  "@formily/core": "2.3.0",
25
- "@nocobase/utils": "1.2.14-alpha",
25
+ "@nocobase/utils": "1.2.15-alpha",
26
26
  "react-i18next": "11.18.6",
27
27
  "sequelize": "6.35.2",
28
- "@nocobase/actions": "1.2.14-alpha",
29
- "@nocobase/database": "1.2.14-alpha"
28
+ "@nocobase/actions": "1.2.15-alpha",
29
+ "@nocobase/database": "1.2.15-alpha"
30
30
  };
@@ -1 +1 @@
1
- {"name":"koa-compose","description":"compose Koa middleware","repository":"koajs/compose","version":"4.1.0","keywords":["koa","middleware","compose"],"files":["index.js"],"dependencies":{},"devDependencies":{"codecov":"^3.0.0","jest":"^21.0.0","matcha":"^0.7.0","standard":"^10.0.3"},"scripts":{"bench":"matcha bench/bench.js","lint":"standard --fix .","test":"jest --forceExit --coverage"},"jest":{"testEnvironment":"node"},"license":"MIT","_lastModified":"2024-07-11T04:41:05.029Z"}
1
+ {"name":"koa-compose","description":"compose Koa middleware","repository":"koajs/compose","version":"4.1.0","keywords":["koa","middleware","compose"],"files":["index.js"],"dependencies":{},"devDependencies":{"codecov":"^3.0.0","jest":"^21.0.0","matcha":"^0.7.0","standard":"^10.0.3"},"scripts":{"bench":"matcha bench/bench.js","lint":"standard --fix .","test":"jest --forceExit --coverage"},"jest":{"testEnvironment":"node"},"license":"MIT","_lastModified":"2024-07-11T14:29:41.448Z"}
@@ -257,9 +257,11 @@ const cacheMiddleware = async (ctx, next) => {
257
257
  }
258
258
  };
259
259
  const checkPermission = (ctx, next) => {
260
- const { collection } = ctx.action.params.values;
260
+ var _a;
261
+ const { collection, dataSource } = ctx.action.params.values;
261
262
  const roleName = ctx.state.currentRole || "anonymous";
262
- const can = ctx.app.acl.can({ role: roleName, resource: collection, action: "list" });
263
+ const acl = ((_a = ctx.app.dataSourceManager.get(dataSource)) == null ? void 0 : _a.acl) || ctx.app.acl;
264
+ const can = acl.can({ role: roleName, resource: collection, action: "list" });
263
265
  if (!can && roleName !== "root") {
264
266
  ctx.throw(403, "No permissions");
265
267
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-data-visualization",
3
- "version": "1.2.14-alpha",
3
+ "version": "1.2.15-alpha",
4
4
  "displayName": "Data visualization",
5
5
  "displayName.zh-CN": "数据可视化",
6
6
  "description": "Provides data visualization feature, including chart block and chart filter block, support line charts, area charts, bar charts and more than a dozen kinds of charts, you can also extend more chart types.",
@@ -28,12 +28,13 @@
28
28
  "@nocobase/actions": "1.x",
29
29
  "@nocobase/cache": "1.x",
30
30
  "@nocobase/client": "1.x",
31
+ "@nocobase/data-source-main": "1.x",
31
32
  "@nocobase/database": "1.x",
32
33
  "@nocobase/server": "1.x",
33
34
  "@nocobase/test": "1.x",
34
35
  "@nocobase/utils": "1.x"
35
36
  },
36
- "gitHead": "717c71eee8cec8d230f1856759d97d6a843f8be6",
37
+ "gitHead": "4ea647a0555e128f9201083a063212c8ed10a98f",
37
38
  "keywords": [
38
39
  "Blocks"
39
40
  ]