From 457f68b195886e5c132d0175d5b3e37917c21946 Mon Sep 17 00:00:00 2001 From: tom27052006 <83423411+tom27052006@users.noreply.github.com> Date: Fri, 13 Nov 2026 21:02:07 +0100 Subject: [PATCH] Return Forbidden for missing Custom Role permissions --- src/auth.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/auth.rs b/src/auth.rs index af279f25..fec9bad6 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -912,7 +912,9 @@ macro_rules! permission_headers { ip: headers.ip, }) } else { - err_handler!("You need to be Admin or Owner to call this endpoint") + // Forbidden as in Bitwarden's permission requirements + error!(target: "auth", "The current user is missing the permission for this endpoint"); + Outcome::Error((rocket::http::Status::Forbidden, "You don't have permission to call this endpoint")) } } }