From 8251ffee18bc18b7cdda281b3ec137023aa79303 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Thu, 10 Oct 2019 14:33:54 -0700 Subject: Add "requires" handlers to all non-trivial routes This commit is the result of an audit to add user levels to the various components that need them. As written: KVM requires admin privilege Virtual media requires admin privilege image upload requires admin privilege /subscribe API requies Login privilege Signed-off-by: Ed Tanous Change-Id: I6384f23769a5ac23f653519656721da7373f088f --- include/obmc_console.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'include/obmc_console.hpp') diff --git a/include/obmc_console.hpp b/include/obmc_console.hpp index b8afba6d71..b545f960e1 100644 --- a/include/obmc_console.hpp +++ b/include/obmc_console.hpp @@ -104,6 +104,7 @@ void connectHandler(const boost::system::error_code& ec) void requestRoutes(CrowApp& app) { BMCWEB_ROUTE(app, "/console0") + .requires({"ConfigureComponents", "ConfigureManager"}) .websocket() .onopen([](crow::websocket::Connection& conn) { BMCWEB_LOG_DEBUG << "Connection " << &conn << " opened"; -- cgit v1.2.3