Skip to content

Commit 8b237eb

Browse files
committed
CLOUDSTACK-4505: allow domain admin to expunge a destroyed VM
1 parent 9be402c commit 8b237eb

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎client/tomcatconf/commands.properties.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ assignVirtualMachine=7
7171
migrateVirtualMachine=1
7272
migrateVirtualMachineWithVolume=1
7373
recoverVirtualMachine=7
74-
expungeVirtualMachine=1
74+
expungeVirtualMachine=7
7575

7676
#### snapshot commands
7777
createSnapshot=15

‎ui/scripts/instances.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,7 +1765,7 @@
17651765
else if (isAdmin())
17661766
jsonObj = $.extend(args.context.instances[0], {
17671767
state: "Expunged"
1768-
}); //after root admin expunge a VM, listVirtualMachines API will no longer returns this expunged VM to all users.
1768+
}); //after root/domain admin expunge a VM, listVirtualMachines API will no longer returns this expunged VM to all users.
17691769
else
17701770
jsonObj = $.extend(args.context.instances[0], {
17711771
state: "Destroyed"
@@ -2101,7 +2101,7 @@
21012101
if (isAdmin() || isDomainAdmin()) {
21022102
allowedActions.push("restore");
21032103
}
2104-
if (isAdmin())
2104+
if (isAdmin() || isDomainAdmin())
21052105
allowedActions.push("expunge");
21062106
} else if (jsonObj.state == 'Running') {
21072107
allowedActions.push("stop");
@@ -2161,7 +2161,7 @@
21612161
} else if (jsonObj.state == 'Error') {
21622162
allowedActions.push("destroy");
21632163
} else if (jsonObj.state == 'Expunging') {
2164-
if (isAdmin())
2164+
if (isAdmin() || isDomainAdmin())
21652165
allowedActions.push("expunge");
21662166
}
21672167
return allowedActions;

0 commit comments

Comments
 (0)