Merge pull request #1595 from shapeblue/ui-resize-show-allusers

ui: show resize volume button to all users![screenshot from 2016-06-23 12-29-56](https://cloud.githubusercontent.com/assets/95203/16294438/436f6dbc-393e-11e6-91b5-cb2e49a01cc6.png)

The resize volume is support on all major hypervisors (Xen, VMware, KVM).
The hypervisor key is returned by the list volumes response only for admins
but not for users or domain admin users. This removes the check, as the operation
is supported on all major hypervisors that CloudStack supports.

With this bug fix all users would see resize volume button in the UI.

/cc @swill

* pr/1595:
  ui: show resize volume button to all users

Signed-off-by: Will Stevens <williamstevens@gmail.com>
This commit is contained in:
Will Stevens 2016-07-18 14:09:17 -04:00
commit a38279de6a
1 changed files with 2 additions and 4 deletions

View File

@ -2365,10 +2365,8 @@
}
}
if (jsonObj.hypervisor == "KVM" || jsonObj.hypervisor == "XenServer" || jsonObj.hypervisor == "VMware") {
if (jsonObj.state == "Ready" || jsonObj.state == "Allocated") {
allowedActions.push("resize");
}
if (jsonObj.state == "Ready" || jsonObj.state == "Allocated") {
allowedActions.push("resize");
}
if (jsonObj.state != "Allocated") {