From 200179f621511522265c2cd3e5c459314e84fcf7 Mon Sep 17 00:00:00 2001 From: Nadja Reitzenstein Date: Fri, 26 Nov 2021 00:31:25 +0100 Subject: [PATCH] Returns current user --- src/api/machine.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/api/machine.rs b/src/api/machine.rs index 256a492..d0a8e72 100644 --- a/src/api/machine.rs +++ b/src/api/machine.rs @@ -63,17 +63,15 @@ impl info::Server for Machine { fn get_machine_info_extended( &mut self, _: info::GetMachineInfoExtendedParams, - _results: info::GetMachineInfoExtendedResults, + mut results: info::GetMachineInfoExtendedResults, ) -> Promise<(), capnp::Error> { - /*if self.perms.manage { + if self.perms.manage { let mut builder = results.get(); let mut extinfo = builder.init_machine_info_extended(); let mut current = extinfo.init_current_user(); - // FIXME fill user + current.set_username(&self.userid.uid); } - Promise::ok(())*/ - - Promise::err(capnp::Error::unimplemented("Extended Infos are unavailable".to_string())) + Promise::ok(()) } fn get_reservation_list(