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/kvm_websocket.hpp b/include/kvm_websocket.hpp
index 817f7c4..d97b03e 100644
--- a/include/kvm_websocket.hpp
+++ b/include/kvm_websocket.hpp
@@ -159,6 +159,7 @@
sessions.reserve(maxSessions);
BMCWEB_ROUTE(app, "/kvm/0")
+ .requires({"ConfigureComponents", "ConfigureManager"})
.websocket()
.onopen([](crow::websocket::Connection& conn) {
BMCWEB_LOG_DEBUG << "Connection " << &conn << " opened";