summaryrefslogtreecommitdiff
path: root/http/routing.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2023-04-10 20:20:13 +0300
committerEd Tanous <ed@tanous.net>2023-04-18 03:32:09 +0300
commit9d192c74ab336adb662312e955ad292e5e48b44e (patch)
tree14387b6732b3a2d654ee0a126f5f1ce6363fc1fa /http/routing.hpp
parent30806a2b2696124771dc72be3f2712b7a39b9d64 (diff)
downloadbmcweb-9d192c74ab336adb662312e955ad292e5e48b44e.tar.xz
Copy privilegeset into websocket rule
Resolves #249 Tested: Running websockets now shows rules being applied ``` Apr 10 20:26:35 p10bmc bmcweb[745]: (2023-04-10 20:26:35) [INFO "http_connection.hpp":209] Request: 0x11e3248 HTTP/1.1 GET /console0 ::ffff:X.XX.XX.XXX | Apr 10 20:26:35 p10bmc bmcweb[745]: (2023-04-10 20:26:35) [DEBUG "routing.hpp":1460] Matched rule (upgrade) '/console0' 1 / 2 Apr 10 20:26:36 p10bmc bmcweb[745]: (2023-04-10 20:26:36) [DEBUG "routing.hpp":1299] userName = admin userRole = priv-admin Apr 10 20:26:36 p10bmc bmcweb[745]: (2023-04-10 20:26:36) [DEBUG "routing.hpp":101] checkPrivileges: Active BASE priv: ConfigureManager <<<<<< Apr 10 20:26:36 p10bmc bmcweb[745]: (2023-04-10 20:26:36) [DEBUG "routing.hpp":101] checkPrivileges: Active BASE priv: ConfigureComponents <<<<<< Apr 10 20:26:36 p10bmc bmcweb[745]: (2023-04-10 20:26:36) [ERROR "routing.hpp":1361] isUserPrivileged: URL: /console0 IsPrivelegeSetEmpty: 0 Username: admin ``` Signed-off-by: Ed Tanous <edtanous@google.com> Tested-by: Ninad Palsule <ninadpalsule@us.ibm.com> Change-Id: Ia2eae1847822b50a425afd2e5e13b528393aa7ad
Diffstat (limited to 'http/routing.hpp')
-rw-r--r--http/routing.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/http/routing.hpp b/http/routing.hpp
index 613b54dc73..0059760abe 100644
--- a/http/routing.hpp
+++ b/http/routing.hpp
@@ -436,6 +436,7 @@ struct RuleParameterTraits
{
self_t* self = static_cast<self_t*>(this);
WebSocketRule* p = new WebSocketRule(self->rule);
+ p->privilegesSet = self->privilegesSet;
self->ruleToUpgrade.reset(p);
return *p;
}