@nocobase/plugin-acl 2.1.0-alpha.14 → 2.1.0-alpha.16
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.
package/dist/externalVersion.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.1.0-alpha.16",
|
|
12
12
|
"antd": "5.24.2",
|
|
13
13
|
"react": "18.2.0",
|
|
14
14
|
"react-i18next": "11.18.6",
|
|
@@ -17,16 +17,16 @@ 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-alpha.
|
|
21
|
-
"@nocobase/client-v2": "2.1.0-alpha.
|
|
22
|
-
"@nocobase/actions": "2.1.0-alpha.
|
|
23
|
-
"@nocobase/cache": "2.1.0-alpha.
|
|
24
|
-
"@nocobase/database": "2.1.0-alpha.
|
|
25
|
-
"@nocobase/server": "2.1.0-alpha.
|
|
26
|
-
"@nocobase/acl": "2.1.0-alpha.
|
|
27
|
-
"@nocobase/test": "2.1.0-alpha.
|
|
20
|
+
"@nocobase/utils": "2.1.0-alpha.16",
|
|
21
|
+
"@nocobase/client-v2": "2.1.0-alpha.16",
|
|
22
|
+
"@nocobase/actions": "2.1.0-alpha.16",
|
|
23
|
+
"@nocobase/cache": "2.1.0-alpha.16",
|
|
24
|
+
"@nocobase/database": "2.1.0-alpha.16",
|
|
25
|
+
"@nocobase/server": "2.1.0-alpha.16",
|
|
26
|
+
"@nocobase/acl": "2.1.0-alpha.16",
|
|
27
|
+
"@nocobase/test": "2.1.0-alpha.16",
|
|
28
28
|
"@formily/core": "2.3.7",
|
|
29
29
|
"@formily/antd-v5": "1.2.3",
|
|
30
30
|
"antd-style": "3.7.1",
|
|
31
|
-
"@nocobase/flow-engine": "2.1.0-alpha.
|
|
31
|
+
"@nocobase/flow-engine": "2.1.0-alpha.16"
|
|
32
32
|
};
|
|
@@ -273,7 +273,7 @@ function normalizeAssociationValue(value, recordKey) {
|
|
|
273
273
|
}
|
|
274
274
|
if (Array.isArray(value)) {
|
|
275
275
|
const result = value.map((v) => typeof v === "number" || typeof v === "string" ? v : v[recordKey]).filter((v) => v !== null && v !== void 0);
|
|
276
|
-
return result
|
|
276
|
+
return result;
|
|
277
277
|
}
|
|
278
278
|
return typeof value === "number" || typeof value === "string" ? value : value[recordKey];
|
|
279
279
|
}
|
package/dist/swagger/index.d.ts
CHANGED
|
@@ -198,6 +198,132 @@ declare const _default: {
|
|
|
198
198
|
};
|
|
199
199
|
};
|
|
200
200
|
};
|
|
201
|
+
'/roles/{roleName}/users:list': {
|
|
202
|
+
get: {
|
|
203
|
+
tags: string[];
|
|
204
|
+
summary: string;
|
|
205
|
+
parameters: {
|
|
206
|
+
$ref: string;
|
|
207
|
+
}[];
|
|
208
|
+
responses: {
|
|
209
|
+
200: {
|
|
210
|
+
description: string;
|
|
211
|
+
content: {
|
|
212
|
+
'application/json': {
|
|
213
|
+
schema: {
|
|
214
|
+
type: string;
|
|
215
|
+
additionalProperties: boolean;
|
|
216
|
+
properties: {
|
|
217
|
+
data: {
|
|
218
|
+
type: string;
|
|
219
|
+
items: {
|
|
220
|
+
type: string;
|
|
221
|
+
additionalProperties: boolean;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
meta: {
|
|
225
|
+
type: string;
|
|
226
|
+
additionalProperties: boolean;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
'/roles/{roleName}/users:add': {
|
|
237
|
+
post: {
|
|
238
|
+
tags: string[];
|
|
239
|
+
summary: string;
|
|
240
|
+
parameters: {
|
|
241
|
+
$ref: string;
|
|
242
|
+
}[];
|
|
243
|
+
responses: {
|
|
244
|
+
200: {
|
|
245
|
+
description: string;
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
'/roles/{roleName}/users:remove': {
|
|
251
|
+
post: {
|
|
252
|
+
tags: string[];
|
|
253
|
+
summary: string;
|
|
254
|
+
parameters: {
|
|
255
|
+
$ref: string;
|
|
256
|
+
}[];
|
|
257
|
+
responses: {
|
|
258
|
+
200: {
|
|
259
|
+
description: string;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
'/users/{userId}/roles:list': {
|
|
265
|
+
get: {
|
|
266
|
+
tags: string[];
|
|
267
|
+
summary: string;
|
|
268
|
+
parameters: {
|
|
269
|
+
$ref: string;
|
|
270
|
+
}[];
|
|
271
|
+
responses: {
|
|
272
|
+
200: {
|
|
273
|
+
description: string;
|
|
274
|
+
content: {
|
|
275
|
+
'application/json': {
|
|
276
|
+
schema: {
|
|
277
|
+
type: string;
|
|
278
|
+
additionalProperties: boolean;
|
|
279
|
+
properties: {
|
|
280
|
+
data: {
|
|
281
|
+
type: string;
|
|
282
|
+
items: {
|
|
283
|
+
type: string;
|
|
284
|
+
additionalProperties: boolean;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
meta: {
|
|
288
|
+
type: string;
|
|
289
|
+
additionalProperties: boolean;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
'/users/{userId}/roles:add': {
|
|
300
|
+
post: {
|
|
301
|
+
tags: string[];
|
|
302
|
+
summary: string;
|
|
303
|
+
parameters: {
|
|
304
|
+
$ref: string;
|
|
305
|
+
}[];
|
|
306
|
+
responses: {
|
|
307
|
+
200: {
|
|
308
|
+
description: string;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
'/users/{userId}/roles:remove': {
|
|
314
|
+
post: {
|
|
315
|
+
tags: string[];
|
|
316
|
+
summary: string;
|
|
317
|
+
parameters: {
|
|
318
|
+
$ref: string;
|
|
319
|
+
}[];
|
|
320
|
+
responses: {
|
|
321
|
+
200: {
|
|
322
|
+
description: string;
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
};
|
|
201
327
|
'/dataSources/{dataSourceKey}/roles:update': {
|
|
202
328
|
post: {
|
|
203
329
|
tags: string[];
|
|
@@ -598,6 +724,17 @@ declare const _default: {
|
|
|
598
724
|
type: string;
|
|
599
725
|
};
|
|
600
726
|
};
|
|
727
|
+
UserIdPath: {
|
|
728
|
+
name: string;
|
|
729
|
+
in: string;
|
|
730
|
+
description: string;
|
|
731
|
+
required: boolean;
|
|
732
|
+
schema: {
|
|
733
|
+
anyOf: {
|
|
734
|
+
type: string;
|
|
735
|
+
}[];
|
|
736
|
+
};
|
|
737
|
+
};
|
|
601
738
|
DataSourceKeyPath: {
|
|
602
739
|
name: string;
|
|
603
740
|
in: string;
|
|
@@ -607,6 +744,42 @@ declare const _default: {
|
|
|
607
744
|
type: string;
|
|
608
745
|
};
|
|
609
746
|
};
|
|
747
|
+
MembershipUserFilterByTkQuery: {
|
|
748
|
+
name: string;
|
|
749
|
+
in: string;
|
|
750
|
+
description: string;
|
|
751
|
+
required: boolean;
|
|
752
|
+
schema: {
|
|
753
|
+
anyOf: ({
|
|
754
|
+
type: string;
|
|
755
|
+
items?: undefined;
|
|
756
|
+
} | {
|
|
757
|
+
type: string;
|
|
758
|
+
items: {
|
|
759
|
+
anyOf: {
|
|
760
|
+
type: string;
|
|
761
|
+
}[];
|
|
762
|
+
};
|
|
763
|
+
})[];
|
|
764
|
+
};
|
|
765
|
+
};
|
|
766
|
+
MembershipRoleFilterByTkQuery: {
|
|
767
|
+
name: string;
|
|
768
|
+
in: string;
|
|
769
|
+
description: string;
|
|
770
|
+
required: boolean;
|
|
771
|
+
schema: {
|
|
772
|
+
anyOf: ({
|
|
773
|
+
type: string;
|
|
774
|
+
items?: undefined;
|
|
775
|
+
} | {
|
|
776
|
+
type: string;
|
|
777
|
+
items: {
|
|
778
|
+
type: string;
|
|
779
|
+
};
|
|
780
|
+
})[];
|
|
781
|
+
};
|
|
782
|
+
};
|
|
610
783
|
ResourceNameQuery: {
|
|
611
784
|
name: string;
|
|
612
785
|
in: string;
|
package/dist/swagger/index.js
CHANGED
|
@@ -213,6 +213,146 @@ var swagger_default = {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
},
|
|
216
|
+
"/roles/{roleName}/users:list": {
|
|
217
|
+
get: {
|
|
218
|
+
tags: ["roles.users"],
|
|
219
|
+
summary: "List users bound to a role",
|
|
220
|
+
parameters: [
|
|
221
|
+
{ $ref: "#/components/parameters/RoleNamePath" },
|
|
222
|
+
{ $ref: "#/components/parameters/PageQuery" },
|
|
223
|
+
{ $ref: "#/components/parameters/PageSizeQuery" },
|
|
224
|
+
{ $ref: "#/components/parameters/SortQuery" },
|
|
225
|
+
{ $ref: "#/components/parameters/AppendsQuery" },
|
|
226
|
+
{ $ref: "#/components/parameters/FilterQuery" }
|
|
227
|
+
],
|
|
228
|
+
responses: {
|
|
229
|
+
200: {
|
|
230
|
+
description: "OK",
|
|
231
|
+
content: {
|
|
232
|
+
"application/json": {
|
|
233
|
+
schema: {
|
|
234
|
+
type: "object",
|
|
235
|
+
additionalProperties: true,
|
|
236
|
+
properties: {
|
|
237
|
+
data: {
|
|
238
|
+
type: "array",
|
|
239
|
+
items: {
|
|
240
|
+
type: "object",
|
|
241
|
+
additionalProperties: true
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
meta: {
|
|
245
|
+
type: "object",
|
|
246
|
+
additionalProperties: true
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"/roles/{roleName}/users:add": {
|
|
257
|
+
post: {
|
|
258
|
+
tags: ["roles.users"],
|
|
259
|
+
summary: "Bind one or more users to a role",
|
|
260
|
+
parameters: [
|
|
261
|
+
{ $ref: "#/components/parameters/RoleNamePath" },
|
|
262
|
+
{ $ref: "#/components/parameters/MembershipUserFilterByTkQuery" }
|
|
263
|
+
],
|
|
264
|
+
responses: {
|
|
265
|
+
200: {
|
|
266
|
+
description: "OK"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"/roles/{roleName}/users:remove": {
|
|
272
|
+
post: {
|
|
273
|
+
tags: ["roles.users"],
|
|
274
|
+
summary: "Unbind one or more users from a role",
|
|
275
|
+
parameters: [
|
|
276
|
+
{ $ref: "#/components/parameters/RoleNamePath" },
|
|
277
|
+
{ $ref: "#/components/parameters/MembershipUserFilterByTkQuery" }
|
|
278
|
+
],
|
|
279
|
+
responses: {
|
|
280
|
+
200: {
|
|
281
|
+
description: "OK"
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"/users/{userId}/roles:list": {
|
|
287
|
+
get: {
|
|
288
|
+
tags: ["users.roles"],
|
|
289
|
+
summary: "List roles bound to a user",
|
|
290
|
+
parameters: [
|
|
291
|
+
{ $ref: "#/components/parameters/UserIdPath" },
|
|
292
|
+
{ $ref: "#/components/parameters/PageQuery" },
|
|
293
|
+
{ $ref: "#/components/parameters/PageSizeQuery" },
|
|
294
|
+
{ $ref: "#/components/parameters/SortQuery" },
|
|
295
|
+
{ $ref: "#/components/parameters/AppendsQuery" },
|
|
296
|
+
{ $ref: "#/components/parameters/FilterQuery" }
|
|
297
|
+
],
|
|
298
|
+
responses: {
|
|
299
|
+
200: {
|
|
300
|
+
description: "OK",
|
|
301
|
+
content: {
|
|
302
|
+
"application/json": {
|
|
303
|
+
schema: {
|
|
304
|
+
type: "object",
|
|
305
|
+
additionalProperties: true,
|
|
306
|
+
properties: {
|
|
307
|
+
data: {
|
|
308
|
+
type: "array",
|
|
309
|
+
items: {
|
|
310
|
+
type: "object",
|
|
311
|
+
additionalProperties: true
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
meta: {
|
|
315
|
+
type: "object",
|
|
316
|
+
additionalProperties: true
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"/users/{userId}/roles:add": {
|
|
327
|
+
post: {
|
|
328
|
+
tags: ["users.roles"],
|
|
329
|
+
summary: "Bind one or more roles to a user",
|
|
330
|
+
parameters: [
|
|
331
|
+
{ $ref: "#/components/parameters/UserIdPath" },
|
|
332
|
+
{ $ref: "#/components/parameters/MembershipRoleFilterByTkQuery" }
|
|
333
|
+
],
|
|
334
|
+
responses: {
|
|
335
|
+
200: {
|
|
336
|
+
description: "OK"
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"/users/{userId}/roles:remove": {
|
|
342
|
+
post: {
|
|
343
|
+
tags: ["users.roles"],
|
|
344
|
+
summary: "Unbind one or more roles from a user",
|
|
345
|
+
parameters: [
|
|
346
|
+
{ $ref: "#/components/parameters/UserIdPath" },
|
|
347
|
+
{ $ref: "#/components/parameters/MembershipRoleFilterByTkQuery" }
|
|
348
|
+
],
|
|
349
|
+
responses: {
|
|
350
|
+
200: {
|
|
351
|
+
description: "OK"
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
},
|
|
216
356
|
"/dataSources/{dataSourceKey}/roles:update": {
|
|
217
357
|
post: {
|
|
218
358
|
tags: ["dataSources.roles"],
|
|
@@ -609,6 +749,15 @@ var swagger_default = {
|
|
|
609
749
|
required: true,
|
|
610
750
|
schema: { type: "string" }
|
|
611
751
|
},
|
|
752
|
+
UserIdPath: {
|
|
753
|
+
name: "userId",
|
|
754
|
+
in: "path",
|
|
755
|
+
description: "User primary key.",
|
|
756
|
+
required: true,
|
|
757
|
+
schema: {
|
|
758
|
+
anyOf: [{ type: "string" }, { type: "integer" }]
|
|
759
|
+
}
|
|
760
|
+
},
|
|
612
761
|
DataSourceKeyPath: {
|
|
613
762
|
name: "dataSourceKey",
|
|
614
763
|
in: "path",
|
|
@@ -616,6 +765,41 @@ var swagger_default = {
|
|
|
616
765
|
required: true,
|
|
617
766
|
schema: { type: "string" }
|
|
618
767
|
},
|
|
768
|
+
MembershipUserFilterByTkQuery: {
|
|
769
|
+
name: "filterByTk",
|
|
770
|
+
in: "query",
|
|
771
|
+
description: "User primary key, or a list of user primary keys.",
|
|
772
|
+
required: true,
|
|
773
|
+
schema: {
|
|
774
|
+
anyOf: [
|
|
775
|
+
{ type: "string" },
|
|
776
|
+
{ type: "integer" },
|
|
777
|
+
{
|
|
778
|
+
type: "array",
|
|
779
|
+
items: {
|
|
780
|
+
anyOf: [{ type: "string" }, { type: "integer" }]
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
]
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
MembershipRoleFilterByTkQuery: {
|
|
787
|
+
name: "filterByTk",
|
|
788
|
+
in: "query",
|
|
789
|
+
description: "Role name, or a list of role names.",
|
|
790
|
+
required: true,
|
|
791
|
+
schema: {
|
|
792
|
+
anyOf: [
|
|
793
|
+
{ type: "string" },
|
|
794
|
+
{
|
|
795
|
+
type: "array",
|
|
796
|
+
items: {
|
|
797
|
+
type: "string"
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
]
|
|
801
|
+
}
|
|
802
|
+
},
|
|
619
803
|
ResourceNameQuery: {
|
|
620
804
|
name: "filterByTk",
|
|
621
805
|
in: "query",
|
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-alpha.
|
|
9
|
+
"version": "2.1.0-alpha.16",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "./dist/server/index.js",
|
|
12
12
|
"homepage": "https://docs.nocobase.com/handbook/acl",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
47
47
|
"directory": "packages/plugins/acl"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "14cf3dbdb9f0a9669602de4ad21a9464fa27c105"
|
|
50
50
|
}
|