mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-09-30 03:51:43 +02:00
Make USB accessories opt-in for Tart VMs (#502)
This commit is contained in:
@@ -238,6 +238,10 @@ func (controller *Controller) updateVMSpec(ctx *gin.Context) responder.Responder
|
||||
return responder.JSON(http.StatusPreconditionFailed, NewErrorResponse("\"netSoftnet\" cannot be "+
|
||||
"toggled for suspendable VMs"))
|
||||
}
|
||||
if dbVM.Suspendable && dbVM.USBAccessories != userVM.USBAccessories {
|
||||
return responder.JSON(http.StatusPreconditionFailed, NewErrorResponse("\"usbAccessories\" cannot be "+
|
||||
"toggled for suspendable VMs"))
|
||||
}
|
||||
|
||||
// Power state-specific sanity checks
|
||||
if !userVM.PowerState.Valid() {
|
||||
|
||||
Reference in New Issue
Block a user