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>

Conflicts:
	ui/scripts/storage.js
This commit is contained in:
Brian Federle 2012-07-02 10:41:20 -07:00
parent 60da16fe8b
commit 723d4919c7
1 changed files with 1 additions and 1 deletions

View File

@ -1306,7 +1306,7 @@
allowedActions.push("recurringSnapshot");
}
if(jsonObj.state != "Allocated") {
if((jsonObj.vmstate == "Stopped" || jsonObj.virtualmachineid == null) && jsonObj.state !="Ready") {
if((jsonObj.vmstate == "Stopped" || jsonObj.virtualmachineid == null) && jsonObj.state != "Ready") {
allowedActions.push("downloadVolume");
}
}