From 3b4121742334a0ac4daea2682ba7305fb7d24ca1 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Sat, 10 Sep 2022 05:45:02 +0100 Subject: [PATCH] Allow switching to current namespace when authenticated as a database user --- lib/src/dbs/executor.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/dbs/executor.rs b/lib/src/dbs/executor.rs index 5a08b0eb..8246d524 100644 --- a/lib/src/dbs/executor.rs +++ b/lib/src/dbs/executor.rs @@ -197,6 +197,7 @@ impl<'a> Executor<'a> { Auth::No => self.set_ns(&mut ctx, &mut opt, ns).await, Auth::Kv => self.set_ns(&mut ctx, &mut opt, ns).await, Auth::Ns(v) if v == ns => self.set_ns(&mut ctx, &mut opt, ns).await, + Auth::Db(v, _) if v == ns => self.set_ns(&mut ctx, &mut opt, ns).await, _ => { opt.ns = None; return Err(Error::NsNotAllowed {