diff --git a/lib/src/dbs/auth.rs b/lib/src/dbs/auth.rs index 3d3c64d3..a2097c8e 100644 --- a/lib/src/dbs/auth.rs +++ b/lib/src/dbs/auth.rs @@ -26,10 +26,10 @@ impl Auth { pub fn check(&self, level: Level) -> bool { match self { Auth::No => matches!(level, Level::No), - Auth::Kv => matches!(level, Level::No | Level::Kv), - Auth::Ns(_) => matches!(level, Level::No | Level::Kv | Level::Ns), - Auth::Db(_, _) => matches!(level, Level::No | Level::Kv | Level::Ns | Level::Db), - Auth::Sc(_, _, _) => true, + Auth::Sc(_, _, _) => matches!(level, Level::No | Level::Sc), + Auth::Db(_, _) => matches!(level, Level::No | Level::Sc | Level::Db), + Auth::Ns(_) => matches!(level, Level::No | Level::Sc | Level::Db | Level::Ns), + Auth::Kv => true, } } } diff --git a/src/net/conf.rs b/src/net/conf.rs index 8ff54cfc..8426c44f 100644 --- a/src/net/conf.rs +++ b/src/net/conf.rs @@ -32,7 +32,7 @@ fn process( ) -> Session { // Create session let conf = Session { - au: Auth::No, + au: Auth::default(), ip: ip.map(|v| v.to_string()), or, id,