@xen-orchestra/acl 1.1.0 → 1.2.0
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/actions/index.d.mts +35 -0
- package/dist/actions/vm.d.mts +35 -0
- package/dist/actions/vm.mjs +35 -0
- package/dist/generated/privilege-types.d.mts +1 -1
- package/dist/index.d.mts +1 -1
- package/package.json +2 -2
package/dist/actions/index.d.mts
CHANGED
|
@@ -223,8 +223,43 @@ export declare const SUPPORTED_ACTIONS_BY_RESOURCE: {
|
|
|
223
223
|
suspend: boolean;
|
|
224
224
|
unpause: boolean;
|
|
225
225
|
update: {
|
|
226
|
+
affinityHost: boolean;
|
|
227
|
+
autoPoweron: boolean;
|
|
228
|
+
blockedOperations: boolean;
|
|
229
|
+
coresPerSocket: boolean;
|
|
230
|
+
cpuCap: boolean;
|
|
231
|
+
cpuMask: boolean;
|
|
232
|
+
cpuWeight: boolean;
|
|
233
|
+
cpus: boolean;
|
|
234
|
+
cpusStaticMax: boolean;
|
|
235
|
+
creation: boolean;
|
|
226
236
|
datasources: boolean;
|
|
237
|
+
expNestedHvm: boolean;
|
|
238
|
+
hasVendorDevice: boolean;
|
|
239
|
+
highAvailability: boolean;
|
|
240
|
+
hvmBootFirmware: boolean;
|
|
241
|
+
memory: boolean;
|
|
242
|
+
memoryMax: boolean;
|
|
243
|
+
memoryMin: boolean;
|
|
244
|
+
memoryStaticMax: boolean;
|
|
245
|
+
nameDescription: boolean;
|
|
246
|
+
nameLabel: boolean;
|
|
247
|
+
nestedVirt: boolean;
|
|
248
|
+
nicType: boolean;
|
|
249
|
+
notes: boolean;
|
|
250
|
+
PV_args: boolean;
|
|
251
|
+
resourceSet: boolean;
|
|
252
|
+
secureBoot: boolean;
|
|
253
|
+
share: boolean;
|
|
254
|
+
startDelay: boolean;
|
|
255
|
+
suspendSr: boolean;
|
|
227
256
|
tags: boolean;
|
|
257
|
+
uefiMode: boolean;
|
|
258
|
+
vga: boolean;
|
|
259
|
+
videoram: boolean;
|
|
260
|
+
viridian: boolean;
|
|
261
|
+
virtualizationMode: boolean;
|
|
262
|
+
xenStoreData: boolean;
|
|
228
263
|
};
|
|
229
264
|
};
|
|
230
265
|
readonly vtpm: {
|
package/dist/actions/vm.d.mts
CHANGED
|
@@ -18,8 +18,43 @@ declare const _default: {
|
|
|
18
18
|
suspend: boolean;
|
|
19
19
|
unpause: boolean;
|
|
20
20
|
update: {
|
|
21
|
+
affinityHost: boolean;
|
|
22
|
+
autoPoweron: boolean;
|
|
23
|
+
blockedOperations: boolean;
|
|
24
|
+
coresPerSocket: boolean;
|
|
25
|
+
cpuCap: boolean;
|
|
26
|
+
cpuMask: boolean;
|
|
27
|
+
cpuWeight: boolean;
|
|
28
|
+
cpus: boolean;
|
|
29
|
+
cpusStaticMax: boolean;
|
|
30
|
+
creation: boolean;
|
|
21
31
|
datasources: boolean;
|
|
32
|
+
expNestedHvm: boolean;
|
|
33
|
+
hasVendorDevice: boolean;
|
|
34
|
+
highAvailability: boolean;
|
|
35
|
+
hvmBootFirmware: boolean;
|
|
36
|
+
memory: boolean;
|
|
37
|
+
memoryMax: boolean;
|
|
38
|
+
memoryMin: boolean;
|
|
39
|
+
memoryStaticMax: boolean;
|
|
40
|
+
nameDescription: boolean;
|
|
41
|
+
nameLabel: boolean;
|
|
42
|
+
nestedVirt: boolean;
|
|
43
|
+
nicType: boolean;
|
|
44
|
+
notes: boolean;
|
|
45
|
+
PV_args: boolean;
|
|
46
|
+
resourceSet: boolean;
|
|
47
|
+
secureBoot: boolean;
|
|
48
|
+
share: boolean;
|
|
49
|
+
startDelay: boolean;
|
|
50
|
+
suspendSr: boolean;
|
|
22
51
|
tags: boolean;
|
|
52
|
+
uefiMode: boolean;
|
|
53
|
+
vga: boolean;
|
|
54
|
+
videoram: boolean;
|
|
55
|
+
viridian: boolean;
|
|
56
|
+
virtualizationMode: boolean;
|
|
57
|
+
xenStoreData: boolean;
|
|
23
58
|
};
|
|
24
59
|
};
|
|
25
60
|
export default _default;
|
package/dist/actions/vm.mjs
CHANGED
|
@@ -18,7 +18,42 @@ export default {
|
|
|
18
18
|
suspend: true,
|
|
19
19
|
unpause: true,
|
|
20
20
|
update: {
|
|
21
|
+
affinityHost: true,
|
|
22
|
+
autoPoweron: true,
|
|
23
|
+
blockedOperations: true,
|
|
24
|
+
coresPerSocket: true,
|
|
25
|
+
cpuCap: true,
|
|
26
|
+
cpuMask: true,
|
|
27
|
+
cpuWeight: true,
|
|
28
|
+
cpus: true,
|
|
29
|
+
cpusStaticMax: true,
|
|
30
|
+
creation: true,
|
|
21
31
|
datasources: true,
|
|
32
|
+
expNestedHvm: true,
|
|
33
|
+
hasVendorDevice: true,
|
|
34
|
+
highAvailability: true,
|
|
35
|
+
hvmBootFirmware: true,
|
|
36
|
+
memory: true,
|
|
37
|
+
memoryMax: true,
|
|
38
|
+
memoryMin: true,
|
|
39
|
+
memoryStaticMax: true,
|
|
40
|
+
nameDescription: true,
|
|
41
|
+
nameLabel: true,
|
|
42
|
+
nestedVirt: true,
|
|
43
|
+
nicType: true,
|
|
44
|
+
notes: true,
|
|
45
|
+
PV_args: true,
|
|
46
|
+
resourceSet: true,
|
|
47
|
+
secureBoot: true,
|
|
48
|
+
share: true,
|
|
49
|
+
startDelay: true,
|
|
50
|
+
suspendSr: true,
|
|
22
51
|
tags: true,
|
|
52
|
+
uefiMode: true,
|
|
53
|
+
vga: true,
|
|
54
|
+
videoram: true,
|
|
55
|
+
viridian: true,
|
|
56
|
+
virtualizationMode: true,
|
|
57
|
+
xenStoreData: true,
|
|
23
58
|
},
|
|
24
59
|
};
|
|
@@ -323,7 +323,7 @@ export type VmTemplatePrivilege = {
|
|
|
323
323
|
export type VmPrivilege = {
|
|
324
324
|
id: XoAclBasePrivilege['id']
|
|
325
325
|
resource: 'vm'
|
|
326
|
-
action: '*' | 'delete' | 'export' | 'pause' | 'read' | 'reboot' | '*' | 'reboot:clean' | 'reboot:hard' | 'resume' | 'revert-snapshot' | 'shutdown' | '*' | 'shutdown:clean' | 'shutdown:hard' | 'snapshot' | 'start' | 'suspend' | 'unpause' | 'update' | '*' | 'update:datasources' | 'update:tags'
|
|
326
|
+
action: '*' | 'delete' | 'export' | 'pause' | 'read' | 'reboot' | '*' | 'reboot:clean' | 'reboot:hard' | 'resume' | 'revert-snapshot' | 'shutdown' | '*' | 'shutdown:clean' | 'shutdown:hard' | 'snapshot' | 'start' | 'suspend' | 'unpause' | 'update' | '*' | 'update:affinityHost' | 'update:autoPoweron' | 'update:blockedOperations' | 'update:coresPerSocket' | 'update:cpuCap' | 'update:cpuMask' | 'update:cpuWeight' | 'update:cpus' | 'update:cpusStaticMax' | 'update:creation' | 'update:datasources' | 'update:expNestedHvm' | 'update:hasVendorDevice' | 'update:highAvailability' | 'update:hvmBootFirmware' | 'update:memory' | 'update:memoryMax' | 'update:memoryMin' | 'update:memoryStaticMax' | 'update:nameDescription' | 'update:nameLabel' | 'update:nestedVirt' | 'update:nicType' | 'update:notes' | 'update:PV_args' | 'update:resourceSet' | 'update:secureBoot' | 'update:share' | 'update:startDelay' | 'update:suspendSr' | 'update:tags' | 'update:uefiMode' | 'update:vga' | 'update:videoram' | 'update:viridian' | 'update:virtualizationMode' | 'update:xenStoreData'
|
|
327
327
|
selector?: XoAclBasePrivilege['selector']
|
|
328
328
|
effect: XoAclBasePrivilege['effect']
|
|
329
329
|
roleId: XoAclBasePrivilege['roleId']
|
package/dist/index.d.mts
CHANGED
|
@@ -23,7 +23,7 @@ export declare function hasPrivilegeOn<T extends SupportedResource>({ user, acti
|
|
|
23
23
|
export declare function getMissingPrivileges(params: AnyPrivilegeOnParam[], userPrivileges: AnyPrivilege[]): {
|
|
24
24
|
objectId: unknown;
|
|
25
25
|
objectIds: unknown[] | undefined;
|
|
26
|
-
action: "create" | "delete" | "read" | "update" | "allow-vm" | "disable" | "enable" | "evacuate" | "export" | "emergency-shutdown" | "rolling-reboot" | "rolling-update" | "run" | "connect" | "disconnect" | "import" | "abort" | "boot" | "export-content" | "import-content" | "instantiate" | "pause" | "reboot" | "resume" | "revert-snapshot" | "shutdown" | "snapshot" | "start" | "suspend" | "unpause" | "*" | "update:action" | "update:resource" | "update:effect" | "update:selector" | "update:description" | "update:groups" | "update:name" | "update:users" | "update:tags" | "export:logs" | "update:management" | "create:network" | "create:vm" | "import:vdi" | "import:vm" | "update:password" | "update:permission" | "update:preferences" | "update:datasources" | "reboot:clean" | "reboot:hard" | "shutdown:clean" | "shutdown:hard";
|
|
26
|
+
action: "create" | "delete" | "read" | "update" | "allow-vm" | "disable" | "enable" | "evacuate" | "export" | "emergency-shutdown" | "rolling-reboot" | "rolling-update" | "run" | "connect" | "disconnect" | "import" | "abort" | "boot" | "export-content" | "import-content" | "instantiate" | "pause" | "reboot" | "resume" | "revert-snapshot" | "shutdown" | "snapshot" | "start" | "suspend" | "unpause" | "*" | "update:action" | "update:resource" | "update:effect" | "update:selector" | "update:description" | "update:groups" | "update:name" | "update:users" | "update:tags" | "export:logs" | "update:management" | "create:network" | "create:vm" | "import:vdi" | "import:vm" | "update:password" | "update:permission" | "update:preferences" | "update:affinityHost" | "update:autoPoweron" | "update:blockedOperations" | "update:coresPerSocket" | "update:cpuCap" | "update:cpuMask" | "update:cpuWeight" | "update:cpus" | "update:cpusStaticMax" | "update:creation" | "update:datasources" | "update:expNestedHvm" | "update:hasVendorDevice" | "update:highAvailability" | "update:hvmBootFirmware" | "update:memory" | "update:memoryMax" | "update:memoryMin" | "update:memoryStaticMax" | "update:nameDescription" | "update:nameLabel" | "update:nestedVirt" | "update:nicType" | "update:notes" | "update:PV_args" | "update:resourceSet" | "update:secureBoot" | "update:share" | "update:startDelay" | "update:suspendSr" | "update:uefiMode" | "update:vga" | "update:videoram" | "update:viridian" | "update:virtualizationMode" | "update:xenStoreData" | "reboot:clean" | "reboot:hard" | "shutdown:clean" | "shutdown:hard";
|
|
27
27
|
resource: "acl-privilege" | "acl-role" | "alarm" | "backup-archive" | "backup-job" | "backup-log" | "backup-repository" | "group" | "gpuGroup" | "host" | "message" | "network" | "pbd" | "pci" | "pgpu" | "pif" | "pool" | "proxy" | "restore-log" | "schedule" | "server" | "sm" | "sr" | "task" | "user" | "vbd" | "vdi-snapshot" | "vdi-unmanaged" | "vdi" | "vgpu" | "vgpuType" | "vif" | "vm-controller" | "vm-snapshot" | "vm-template" | "vm" | "vtpm";
|
|
28
28
|
}[];
|
|
29
29
|
export declare function hasPrivileges(params: AnyPrivilegeOnParam[], userPrivileges: AnyPrivilege[]): boolean;
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"main": "dist/index.mjs",
|
|
7
7
|
"name": "@xen-orchestra/acl",
|
|
8
8
|
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/@xen-orchestra/acl",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.2.0",
|
|
10
10
|
"license": "AGPL-3.0-or-later",
|
|
11
11
|
"private": false,
|
|
12
12
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@eslint/js": "^9.19.0",
|
|
33
|
-
"@vates/types": "^1.
|
|
33
|
+
"@vates/types": "^1.26.0",
|
|
34
34
|
"rimraf": "^6.0.1",
|
|
35
35
|
"typescript": "~5.6",
|
|
36
36
|
"typescript-eslint": "^8.23.0"
|