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/vm_websocket.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'include/vm_websocket.hpp') diff --git a/include/vm_websocket.hpp b/include/vm_websocket.hpp index 57a690c205..d1127a4209 100644 --- a/include/vm_websocket.hpp +++ b/include/vm_websocket.hpp @@ -160,6 +160,7 @@ static std::shared_ptr handler; template void requestRoutes(Crow& app) { BMCWEB_ROUTE(app, "/vm/0/0") + .requires({"ConfigureComponents", "ConfigureManager"}) .websocket() .onopen([](crow::websocket::Connection& conn) { BMCWEB_LOG_DEBUG << "Connection " << &conn << " opened"; -- cgit v1.2.3