routing.hpp (c0bdf22334f859d1d2a522d3841160f579a3cbab) | routing.hpp (2d6cb56b6b47c3fbb0d234ade5c1208edb69ef1f) |
---|---|
1#pragma once 2 3#include "common.hpp" 4#include "dbus_utility.hpp" 5#include "error_messages.hpp" 6#include "http_request.hpp" 7#include "http_response.hpp" 8#include "logging.hpp" --- 1356 unchanged lines hidden (view full) --- 1365 << static_cast<uint32_t>(req.method()) << " / " 1366 << rule.getMethods(); 1367 1368 if (req.session == nullptr) 1369 { 1370 rule.handle(req, asyncResp, params); 1371 return; 1372 } | 1#pragma once 2 3#include "common.hpp" 4#include "dbus_utility.hpp" 5#include "error_messages.hpp" 6#include "http_request.hpp" 7#include "http_response.hpp" 8#include "logging.hpp" --- 1356 unchanged lines hidden (view full) --- 1365 << static_cast<uint32_t>(req.method()) << " / " 1366 << rule.getMethods(); 1367 1368 if (req.session == nullptr) 1369 { 1370 rule.handle(req, asyncResp, params); 1371 return; 1372 } |
1373 std::string username = req.session->username; |
|
1373 1374 crow::connections::systemBus->async_method_call( | 1374 1375 crow::connections::systemBus->async_method_call( |
1375 [&req, asyncResp, &rule, 1376 params](const boost::system::error_code ec, 1377 const dbus::utility::DBusPropertiesMap& userInfoMap) { | 1376 [req{std::move(req)}, asyncResp, &rule, params]( 1377 const boost::system::error_code ec, 1378 const dbus::utility::DBusPropertiesMap& userInfoMap) mutable { |
1378 if (ec) 1379 { 1380 BMCWEB_LOG_ERROR << "GetUserInfo failed..."; 1381 asyncResp->res.result( 1382 boost::beast::http::status::internal_server_error); 1383 return; 1384 } 1385 std::string userRole{}; --- 82 unchanged lines hidden (view full) --- 1468 } 1469 return; 1470 } 1471 1472 req.userRole = userRole; 1473 rule.handle(req, asyncResp, params); 1474 }, 1475 "xyz.openbmc_project.User.Manager", "/xyz/openbmc_project/user", | 1379 if (ec) 1380 { 1381 BMCWEB_LOG_ERROR << "GetUserInfo failed..."; 1382 asyncResp->res.result( 1383 boost::beast::http::status::internal_server_error); 1384 return; 1385 } 1386 std::string userRole{}; --- 82 unchanged lines hidden (view full) --- 1469 } 1470 return; 1471 } 1472 1473 req.userRole = userRole; 1474 rule.handle(req, asyncResp, params); 1475 }, 1476 "xyz.openbmc_project.User.Manager", "/xyz/openbmc_project/user", |
1476 "xyz.openbmc_project.User.Manager", "GetUserInfo", 1477 req.session->username); | 1477 "xyz.openbmc_project.User.Manager", "GetUserInfo", username); |
1478 } 1479 1480 void debugPrint() 1481 { 1482 for (size_t i = 0; i < perMethods.size(); i++) 1483 { 1484 BMCWEB_LOG_DEBUG << boost::beast::http::to_string( 1485 static_cast<boost::beast::http::verb>(i)); --- 35 unchanged lines hidden --- | 1478 } 1479 1480 void debugPrint() 1481 { 1482 for (size_t i = 0; i < perMethods.size(); i++) 1483 { 1484 BMCWEB_LOG_DEBUG << boost::beast::http::to_string( 1485 static_cast<boost::beast::http::verb>(i)); --- 35 unchanged lines hidden --- |