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 <ed.tanous@intel.com>
Change-Id: I6384f23769a5ac23f653519656721da7373f088f
diff --git a/include/obmc_console.hpp b/include/obmc_console.hpp
index b8afba6..b545f96 100644
--- a/include/obmc_console.hpp
+++ b/include/obmc_console.hpp
@@ -104,6 +104,7 @@
void requestRoutes(CrowApp& app)
{
BMCWEB_ROUTE(app, "/console0")
+ .requires({"ConfigureComponents", "ConfigureManager"})
.websocket()
.onopen([](crow::websocket::Connection& conn) {
BMCWEB_LOG_DEBUG << "Connection " << &conn << " opened";