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
diff --git a/http/routing.hpp b/http/routing.hpp
index 613b54d..0059760 100644
--- a/http/routing.hpp
+++ b/http/routing.hpp
@@ -436,6 +436,7 @@
{
self_t* self = static_cast<self_t*>(this);
WebSocketRule* p = new WebSocketRule(self->rule);
+ p->privilegesSet = self->privilegesSet;
self->ruleToUpgrade.reset(p);
return *p;
}