summaryrefslogtreecommitdiff
path: root/include/vm_websocket.hpp
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2019-10-11 00:33:54 +0300
committerEd Tanous <ed.tanous@intel.com>2019-10-21 23:25:08 +0300
commit8251ffee18bc18b7cdda281b3ec137023aa79303 (patch)
tree13e8e75db89cb31bb595723f758fe4cc319fb954 /include/vm_websocket.hpp
parent1f56a3a6031ba5992d52532cf2d32c76253c9167 (diff)
downloadbmcweb-8251ffee18bc18b7cdda281b3ec137023aa79303.tar.xz
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
Diffstat (limited to 'include/vm_websocket.hpp')
-rw-r--r--include/vm_websocket.hpp1
1 files changed, 1 insertions, 0 deletions
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> handler;
template <typename... Middlewares> void requestRoutes(Crow<Middlewares...>& app)
{
BMCWEB_ROUTE(app, "/vm/0/0")
+ .requires({"ConfigureComponents", "ConfigureManager"})
.websocket()
.onopen([](crow::websocket::Connection& conn) {
BMCWEB_LOG_DEBUG << "Connection " << &conn << " opened";