From: Ian Jackson Date: Sat, 29 May 2021 21:56:35 +0000 (+0100) Subject: cmdlistener: Make space AuthState::Ssh variant X-Git-Tag: otter-0.7.0~213 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=fff194caf7abb4bdfc131c88b70fe1a05f73d8e4;p=otter.git cmdlistener: Make space AuthState::Ssh variant Signed-off-by: Ian Jackson --- diff --git a/daemon/cmdlistener.rs b/daemon/cmdlistener.rs index 377dda94..e7a712ef 100644 --- a/daemon/cmdlistener.rs +++ b/daemon/cmdlistener.rs @@ -1730,7 +1730,10 @@ fn authorise_scope_direct(cs: &CommandStreamData, ag: &AccountsGuard, fn do_authorise_scope(cs: &CommandStreamData, _ag: &AccountsGuard, wanted: &AccountScope) -> Authorisation { - if let Some(y) = cs.is_superuser() { return y } + match &cs.authstate { + &AuthState::Superuser { auth, .. } => return auth.into(), + _ => {}, + } match &wanted {