@nocobase/plugin-acl 2.1.0-beta.10 → 2.1.0-beta.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.
@@ -8,7 +8,7 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.1.0-beta.10",
11
+ "@nocobase/client": "2.1.0-beta.12",
12
12
  "antd": "5.24.2",
13
13
  "react": "18.2.0",
14
14
  "react-i18next": "11.18.6",
@@ -17,13 +17,13 @@ module.exports = {
17
17
  "@formily/react": "2.3.7",
18
18
  "@ant-design/icons": "5.6.1",
19
19
  "lodash": "4.17.21",
20
- "@nocobase/utils": "2.1.0-beta.10",
21
- "@nocobase/actions": "2.1.0-beta.10",
22
- "@nocobase/cache": "2.1.0-beta.10",
23
- "@nocobase/database": "2.1.0-beta.10",
24
- "@nocobase/server": "2.1.0-beta.10",
25
- "@nocobase/acl": "2.1.0-beta.10",
26
- "@nocobase/test": "2.1.0-beta.10",
20
+ "@nocobase/utils": "2.1.0-beta.12",
21
+ "@nocobase/actions": "2.1.0-beta.12",
22
+ "@nocobase/cache": "2.1.0-beta.12",
23
+ "@nocobase/database": "2.1.0-beta.12",
24
+ "@nocobase/server": "2.1.0-beta.12",
25
+ "@nocobase/acl": "2.1.0-beta.12",
26
+ "@nocobase/test": "2.1.0-beta.12",
27
27
  "@formily/core": "2.3.7",
28
28
  "@formily/antd-v5": "1.2.3",
29
29
  "antd-style": "3.7.1"
@@ -23,6 +23,7 @@ export type SanitizeAssociationValuesOptions = {
23
23
  collection?: Collection;
24
24
  db?: any;
25
25
  database?: any;
26
+ state?: Record<string, any>;
26
27
  timezone?: string;
27
28
  userProvider?: UserProvider;
28
29
  };
@@ -67,6 +67,7 @@ async function sanitizeAssociationValues(options) {
67
67
  timezone: options.timezone,
68
68
  userProvider: options.userProvider,
69
69
  state: {
70
+ ...options.state || {},
70
71
  currentRole: options.currentRole,
71
72
  currentRoles: options.roles,
72
73
  currentUser: options.currentUser
@@ -122,6 +123,7 @@ const checkChangesWithAssociation = async (ctx, next) => {
122
123
  roles,
123
124
  currentRole: ctx.state.currentRole,
124
125
  currentUser: ctx.state.currentUser,
126
+ state: import_lodash.default.clone(ctx.state),
125
127
  aclParams: (_k = (_j = ctx.permission) == null ? void 0 : _j.can) == null ? void 0 : _k.params,
126
128
  timezone,
127
129
  userProvider: (0, import_acl.createUserProvider)({
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description": "Based on roles, resources, and actions, access control can precisely manage interface configuration permissions, data operation permissions, menu access permissions, and plugin permissions.",
7
7
  "description.ru-RU": "На основе ролей, ресурсов и действий система контроля доступа может точно управлять разрешениями на изменение интерфейса, работу с данными, доступ к меню и разрешениями для подключаемых модулей.",
8
8
  "description.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。",
9
- "version": "2.1.0-beta.10",
9
+ "version": "2.1.0-beta.12",
10
10
  "license": "Apache-2.0",
11
11
  "main": "./dist/server/index.js",
12
12
  "homepage": "https://docs.nocobase.com/handbook/acl",
@@ -44,5 +44,5 @@
44
44
  "url": "git+https://github.com/nocobase/nocobase.git",
45
45
  "directory": "packages/plugins/acl"
46
46
  },
47
- "gitHead": "f7e467710d4748f7089b779494b220025b39bc02"
47
+ "gitHead": "25cee9643f42f850afc4adc33c55a56850ac730d"
48
48
  }