diff --git a/XenAdmin/Dialogs/NewDiskDialog.cs b/XenAdmin/Dialogs/NewDiskDialog.cs index 23f3c1b10..51d53966f 100644 --- a/XenAdmin/Dialogs/NewDiskDialog.cs +++ b/XenAdmin/Dialogs/NewDiskDialog.cs @@ -165,6 +165,7 @@ namespace XenAdmin.Dialogs if (_vm != null) { + //note that this action alters the Device var action = new CreateDiskAction(Disk, Device, _vm); using (var dialog = new ActionProgressDialog(action, ProgressBarStyle.Blocks)) dialog.ShowDialog(); diff --git a/XenModel/Actions/VDI/CreateDiskAction.cs b/XenModel/Actions/VDI/CreateDiskAction.cs index 2f5ca4c12..867874ae5 100644 --- a/XenModel/Actions/VDI/CreateDiskAction.cs +++ b/XenModel/Actions/VDI/CreateDiskAction.cs @@ -53,6 +53,8 @@ namespace XenAdmin.Actions { _device = device; VM = vm; + + ApiMethodsToRoleCheck.AddRange("VM.get_allowed_VBD_devices", "VDI.create"); } protected override void Run()