@nocobase/plugin-acl 1.2.12-alpha → 1.3.0-alpha.20240710084543
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/package.json +2 -2
- package/dist/client/NewRole.d.ts +0 -10
- package/dist/client/RolesManagement.d.ts +0 -10
- package/dist/client/RolesManagerProvider.d.ts +0 -13
- package/dist/client/RolesMenu.d.ts +0 -15
- package/dist/client/hooks/load-more-observer.d.ts +0 -15
- package/dist/client/index.d.ts +0 -16
- package/dist/client/index.js +0 -18
- package/dist/client/locale.d.ts +0 -9
- package/dist/client/permissions/ActionPermissions.d.ts +0 -12
- package/dist/client/permissions/AvailableActions.d.ts +0 -11
- package/dist/client/permissions/GeneralPermissions.d.ts +0 -12
- package/dist/client/permissions/MenuItemsProvider.d.ts +0 -12
- package/dist/client/permissions/MenuPermissions.d.ts +0 -12
- package/dist/client/permissions/Permissions.d.ts +0 -12
- package/dist/client/permissions/PluginPermissions.d.ts +0 -12
- package/dist/client/permissions/RolesResourcesActions.d.ts +0 -11
- package/dist/client/permissions/ScopeSelect.d.ts +0 -11
- package/dist/client/permissions/StrategyActions.d.ts +0 -10
- package/dist/client/permissions/style.d.ts +0 -9
- package/dist/client/roles-manager.d.ts +0 -18
- package/dist/client/schemas/roles.d.ts +0 -63
- package/dist/client/schemas/scopes.d.ts +0 -75
- package/dist/externalVersion.js +0 -31
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -48
- package/dist/locale/en-US.json +0 -6
- package/dist/locale/ko_KR.json +0 -4
- package/dist/locale/zh-CN.json +0 -11
- package/dist/server/actions/available-actions.d.ts +0 -15
- package/dist/server/actions/available-actions.js +0 -51
- package/dist/server/actions/role-check.d.ts +0 -9
- package/dist/server/actions/role-check.js +0 -76
- package/dist/server/actions/role-collections.d.ts +0 -15
- package/dist/server/actions/role-collections.js +0 -84
- package/dist/server/actions/user-setDefaultRole.d.ts +0 -10
- package/dist/server/actions/user-setDefaultRole.js +0 -74
- package/dist/server/collections/roles-users.d.ts +0 -10
- package/dist/server/collections/roles-users.js +0 -39
- package/dist/server/collections/roles.d.ts +0 -10
- package/dist/server/collections/roles.js +0 -128
- package/dist/server/collections/rolesResources.d.ts +0 -10
- package/dist/server/collections/rolesResources.js +0 -64
- package/dist/server/collections/rolesResourcesActions.d.ts +0 -10
- package/dist/server/collections/rolesResourcesActions.js +0 -60
- package/dist/server/collections/rolesResourcesScopes.d.ts +0 -10
- package/dist/server/collections/rolesResourcesScopes.js +0 -54
- package/dist/server/collections/users.d.ts +0 -14
- package/dist/server/collections/users.js +0 -61
- package/dist/server/index.d.ts +0 -13
- package/dist/server/index.js +0 -56
- package/dist/server/middlewares/setCurrentRole.d.ts +0 -10
- package/dist/server/middlewares/setCurrentRole.js +0 -86
- package/dist/server/middlewares/with-acl-meta.d.ts +0 -10
- package/dist/server/middlewares/with-acl-meta.js +0 -255
- package/dist/server/migrations/20221214072638-set-role-snippets.d.ts +0 -14
- package/dist/server/migrations/20221214072638-set-role-snippets.js +0 -53
- package/dist/server/model/RoleModel.d.ts +0 -16
- package/dist/server/model/RoleModel.js +0 -55
- package/dist/server/model/RoleResourceActionModel.d.ts +0 -17
- package/dist/server/model/RoleResourceActionModel.js +0 -53
- package/dist/server/model/RoleResourceModel.d.ts +0 -20
- package/dist/server/model/RoleResourceModel.js +0 -72
- package/dist/server/server.d.ts +0 -24
- package/dist/server/server.js +0 -552
- package/dist/swagger/index.d.ts +0 -374
- package/dist/swagger/index.js +0 -404
package/dist/swagger/index.js
DELETED
|
@@ -1,404 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var swagger_exports = {};
|
|
28
|
-
__export(swagger_exports, {
|
|
29
|
-
default: () => swagger_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(swagger_exports);
|
|
32
|
-
var swagger_default = {
|
|
33
|
-
openapi: "3.0.2",
|
|
34
|
-
info: {
|
|
35
|
-
title: "NocoBase API - ACL plugin"
|
|
36
|
-
},
|
|
37
|
-
paths: {
|
|
38
|
-
"/roles:list": {
|
|
39
|
-
get: {
|
|
40
|
-
tags: ["roles"],
|
|
41
|
-
description: "",
|
|
42
|
-
parameters: [],
|
|
43
|
-
responses: {
|
|
44
|
-
200: {
|
|
45
|
-
description: "ok",
|
|
46
|
-
content: {
|
|
47
|
-
"application/json": {
|
|
48
|
-
schema: {
|
|
49
|
-
type: "array",
|
|
50
|
-
items: {
|
|
51
|
-
$ref: "#/components/schemas/role"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"/roles:get": {
|
|
61
|
-
get: {
|
|
62
|
-
tags: ["roles"],
|
|
63
|
-
description: "",
|
|
64
|
-
parameters: [
|
|
65
|
-
{
|
|
66
|
-
name: "filterByTk",
|
|
67
|
-
in: "query",
|
|
68
|
-
description: "role name",
|
|
69
|
-
required: true,
|
|
70
|
-
schema: {
|
|
71
|
-
type: "string"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
responses: {
|
|
76
|
-
200: {
|
|
77
|
-
description: "ok",
|
|
78
|
-
content: {
|
|
79
|
-
"application/json": {
|
|
80
|
-
schema: {
|
|
81
|
-
$ref: "#/components/schemas/role"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"/roles:create": {
|
|
90
|
-
post: {
|
|
91
|
-
tags: ["roles"],
|
|
92
|
-
description: "",
|
|
93
|
-
requestBody: {
|
|
94
|
-
content: {
|
|
95
|
-
"application/json": {
|
|
96
|
-
schema: {
|
|
97
|
-
$ref: "#/components/schemas/role"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
responses: {
|
|
103
|
-
"200": {
|
|
104
|
-
description: "OK",
|
|
105
|
-
content: {
|
|
106
|
-
"application/json": {
|
|
107
|
-
schema: {
|
|
108
|
-
$ref: "#/components/schemas/role"
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
"/roles:update": {
|
|
117
|
-
post: {
|
|
118
|
-
tags: ["roles"],
|
|
119
|
-
description: "",
|
|
120
|
-
parameters: [
|
|
121
|
-
{
|
|
122
|
-
name: "filterByTk",
|
|
123
|
-
in: "query",
|
|
124
|
-
description: "role name",
|
|
125
|
-
required: true,
|
|
126
|
-
schema: {
|
|
127
|
-
type: "string"
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
],
|
|
131
|
-
requestBody: {
|
|
132
|
-
content: {
|
|
133
|
-
"application/json": {
|
|
134
|
-
schema: {
|
|
135
|
-
$ref: "#/components/schemas/role"
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
responses: {
|
|
141
|
-
200: {
|
|
142
|
-
description: "ok",
|
|
143
|
-
content: {
|
|
144
|
-
"application/json": {
|
|
145
|
-
schema: {
|
|
146
|
-
$ref: "#/components/schemas/role"
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
"/roles:destroy": {
|
|
155
|
-
post: {
|
|
156
|
-
tags: ["roles"],
|
|
157
|
-
description: "",
|
|
158
|
-
parameters: [
|
|
159
|
-
{
|
|
160
|
-
name: "filterByTk",
|
|
161
|
-
in: "query",
|
|
162
|
-
description: "role name",
|
|
163
|
-
required: true,
|
|
164
|
-
schema: {
|
|
165
|
-
type: "string"
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
],
|
|
169
|
-
responses: {
|
|
170
|
-
"200": {
|
|
171
|
-
description: "OK"
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
"/roles:check": {
|
|
177
|
-
get: {
|
|
178
|
-
tags: ["roles"],
|
|
179
|
-
description: "return current user role",
|
|
180
|
-
responses: {
|
|
181
|
-
200: {
|
|
182
|
-
description: "ok",
|
|
183
|
-
content: {
|
|
184
|
-
"application/json": {
|
|
185
|
-
schema: {
|
|
186
|
-
$ref: "#/components/schemas/role"
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
"/roles:setDefaultRole": {
|
|
195
|
-
post: {
|
|
196
|
-
tags: ["roles"],
|
|
197
|
-
description: "set default role for new user",
|
|
198
|
-
requestBody: {
|
|
199
|
-
content: {
|
|
200
|
-
"application/json": {
|
|
201
|
-
schema: {
|
|
202
|
-
type: "object",
|
|
203
|
-
properties: {
|
|
204
|
-
roleName: {
|
|
205
|
-
type: "string"
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
responses: {
|
|
213
|
-
"200": {
|
|
214
|
-
description: "OK"
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
"/roles/{roleName}/collections:list": {
|
|
220
|
-
get: {
|
|
221
|
-
tags: ["roles.collections"],
|
|
222
|
-
description: "list permissions of collections for role by roleName",
|
|
223
|
-
parameters: [
|
|
224
|
-
{
|
|
225
|
-
name: "filterByTk",
|
|
226
|
-
in: "query",
|
|
227
|
-
description: "role name",
|
|
228
|
-
required: true,
|
|
229
|
-
schema: {
|
|
230
|
-
type: "string"
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
],
|
|
234
|
-
responses: {
|
|
235
|
-
"200": {
|
|
236
|
-
description: "OK",
|
|
237
|
-
content: {
|
|
238
|
-
"application/json": {
|
|
239
|
-
schema: {
|
|
240
|
-
type: "array",
|
|
241
|
-
items: {
|
|
242
|
-
type: "object",
|
|
243
|
-
properties: {
|
|
244
|
-
type: {
|
|
245
|
-
type: "string",
|
|
246
|
-
description: "collection"
|
|
247
|
-
},
|
|
248
|
-
name: {
|
|
249
|
-
type: "string",
|
|
250
|
-
description: "collection name"
|
|
251
|
-
},
|
|
252
|
-
collectionName: {
|
|
253
|
-
type: "string",
|
|
254
|
-
description: "collection name"
|
|
255
|
-
},
|
|
256
|
-
title: {
|
|
257
|
-
type: "string",
|
|
258
|
-
description: "collection title"
|
|
259
|
-
},
|
|
260
|
-
roleName: {
|
|
261
|
-
type: "string",
|
|
262
|
-
description: "role name"
|
|
263
|
-
},
|
|
264
|
-
usingConfig: {
|
|
265
|
-
type: "string",
|
|
266
|
-
enum: ["resourceAction", "strategy"],
|
|
267
|
-
description: "resourceAction: \u5355\u72EC\u914D\u7F6E, strategy: \u5168\u5C40\u7B56\u7565"
|
|
268
|
-
},
|
|
269
|
-
exists: {
|
|
270
|
-
type: "boolean",
|
|
271
|
-
description: "\u662F\u5426\u5B58\u5728\u5355\u72EC\u914D\u7F6E\u7684\u6743\u9650"
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
|
-
"/availableActions:list": {
|
|
283
|
-
get: {
|
|
284
|
-
tags: ["availableActions"],
|
|
285
|
-
description: "available actions of resource in current system",
|
|
286
|
-
parameters: [],
|
|
287
|
-
responses: {
|
|
288
|
-
"200": {
|
|
289
|
-
description: "OK",
|
|
290
|
-
content: {
|
|
291
|
-
"application/json": {
|
|
292
|
-
schema: {
|
|
293
|
-
type: "array",
|
|
294
|
-
items: {
|
|
295
|
-
type: "object",
|
|
296
|
-
properties: {
|
|
297
|
-
name: {
|
|
298
|
-
type: "string",
|
|
299
|
-
description: "Action\u540D\u79F0"
|
|
300
|
-
},
|
|
301
|
-
displayName: {
|
|
302
|
-
type: "string",
|
|
303
|
-
description: "Action\u663E\u793A\u540D\u79F0"
|
|
304
|
-
},
|
|
305
|
-
allowConfigureFields: {
|
|
306
|
-
type: "boolean",
|
|
307
|
-
description: "\u662F\u5426\u5141\u8BB8\u914D\u7F6E\u5B57\u6BB5"
|
|
308
|
-
},
|
|
309
|
-
onNewRecord: {
|
|
310
|
-
type: "string",
|
|
311
|
-
description: "\u662F\u5426\u662F\u65B0\u8BB0\u5F55\u7684Action"
|
|
312
|
-
},
|
|
313
|
-
type: {
|
|
314
|
-
type: "string",
|
|
315
|
-
description: "new-data \u6216\u8005 old-data"
|
|
316
|
-
},
|
|
317
|
-
aliases: {
|
|
318
|
-
type: "array",
|
|
319
|
-
items: {
|
|
320
|
-
type: "string"
|
|
321
|
-
},
|
|
322
|
-
description: "\u522B\u540D"
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
components: {
|
|
335
|
-
schemas: {
|
|
336
|
-
role: {
|
|
337
|
-
type: "object",
|
|
338
|
-
properties: {
|
|
339
|
-
title: {
|
|
340
|
-
type: "string",
|
|
341
|
-
description: "\u89D2\u8272\u540D\u79F0"
|
|
342
|
-
},
|
|
343
|
-
name: {
|
|
344
|
-
type: "string",
|
|
345
|
-
description: "\u89D2\u8272\u6807\u8BC6"
|
|
346
|
-
},
|
|
347
|
-
description: {
|
|
348
|
-
type: "string",
|
|
349
|
-
description: "\u89D2\u8272\u63CF\u8FF0"
|
|
350
|
-
},
|
|
351
|
-
hidden: {
|
|
352
|
-
type: "boolean",
|
|
353
|
-
description: "\u662F\u5426\u9690\u85CF"
|
|
354
|
-
},
|
|
355
|
-
default: {
|
|
356
|
-
type: "boolean",
|
|
357
|
-
description: "\u662F\u5426\u9ED8\u8BA4"
|
|
358
|
-
},
|
|
359
|
-
allowConfigure: {
|
|
360
|
-
type: "boolean",
|
|
361
|
-
description: "\u662F\u5426\u5141\u8BB8\u914D\u7F6E"
|
|
362
|
-
},
|
|
363
|
-
allowNewMenu: {
|
|
364
|
-
type: "boolean",
|
|
365
|
-
description: "\u662F\u5426\u5141\u8BB8\u65B0\u5EFA\u83DC\u5355"
|
|
366
|
-
},
|
|
367
|
-
snippets: {
|
|
368
|
-
type: "array",
|
|
369
|
-
items: {
|
|
370
|
-
type: "string"
|
|
371
|
-
},
|
|
372
|
-
description: "\u63A5\u53E3\u6743\u9650"
|
|
373
|
-
},
|
|
374
|
-
strategy: {
|
|
375
|
-
type: "array",
|
|
376
|
-
description: "\u6570\u636E\u8868\u6743\u9650\u7B56\u7565",
|
|
377
|
-
items: {
|
|
378
|
-
type: "object",
|
|
379
|
-
properties: {
|
|
380
|
-
actions: {
|
|
381
|
-
type: "array",
|
|
382
|
-
items: {
|
|
383
|
-
type: "string"
|
|
384
|
-
},
|
|
385
|
-
description: "\u64CD\u4F5C"
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
},
|
|
390
|
-
createdAt: {
|
|
391
|
-
type: "string",
|
|
392
|
-
format: "date-time",
|
|
393
|
-
description: "\u521B\u5EFA\u65F6\u95F4"
|
|
394
|
-
},
|
|
395
|
-
updatedAt: {
|
|
396
|
-
type: "string",
|
|
397
|
-
format: "date-time",
|
|
398
|
-
description: "\u66F4\u65B0\u65F6\u95F4"
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
};
|