mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CS-14907: Only allow download volume for uploaded volumes
This fixes an issue where an uploaded volume that hasn't been moved to primary storage yet is downloaded, causing an error. This adjusts the actionFilter to fix this. Original patch by: Pranav Saxena <pranav.saxena@citrix.com> reviewed-by: Brian Federle <brian.federle@citrix.com>
This commit is contained in:
parent
de04b8cb79
commit
b70bc92f46
@ -1310,7 +1310,7 @@
|
||||
allowedActions.push("recurringSnapshot");
|
||||
}
|
||||
if(jsonObj.state != "Allocated") {
|
||||
if(jsonObj.vmstate == "Stopped" || jsonObj.virtualmachineid == null) {
|
||||
if((jsonObj.vmstate == "Stopped" || jsonObj.virtualmachineid == null) && jsonObj.state != "Ready") {
|
||||
allowedActions.push("downloadVolume");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user