Browse Source

Return Forbidden for missing Custom Role permissions

pull/7960/head
tom27052006 3 days ago
parent
commit
457f68b195
  1. 4
      src/auth.rs

4
src/auth.rs

@ -912,7 +912,9 @@ macro_rules! permission_headers {
ip: headers.ip, ip: headers.ip,
}) })
} else { } 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"))
} }
} }
} }

Loading…
Cancel
Save