set prodable interface when in use

This commit is contained in:
Kai Jan Kriegel 2023-03-18 17:18:07 +01:00
parent 3e72d915e6
commit 8c0542fdec

View File

@ -54,9 +54,6 @@ impl Machine {
}
{
builder.set_use(capnp_rpc::new_client(self.clone()));
if self.resource.get_description().prodable {
builder.set_prodable(capnp_rpc::new_client(self.clone()));
}
}
if self.session.has_manage(&self.resource) {
@ -72,6 +69,9 @@ impl Machine {
ArchivedStatus::InUse(owner) => {
if owner == &user {
builder.set_inuse(capnp_rpc::new_client(self.clone()));
if self.resource.get_description().prodable {
builder.set_prodable(capnp_rpc::new_client(self.clone()));
}
}
MachineState::InUse
}