Fix BIOS privileges
Post method:
1) /redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios/
ConfigureManager -> ConfigureComponents
This change allows Admin and operator users to Reset bios.
Before this change, the only admin user has that privileges.
Tested: Ran curl Post requests with Admin and Operator privileged users
Get output as aspected.
Email sent to openbmc list:
https://lists.ozlabs.org/pipermail/openbmc/2021-August/027232.html
Signed-off-by: Abhishek Patel <Abhishek.Patel@ibm.com>
Change-Id: Ia8638c822f0f84d657ece1a8e1b1aa38019b24d7
diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp
index 604b8e7..3cf6077 100644
--- a/redfish-core/lib/bios.hpp
+++ b/redfish-core/lib/bios.hpp
@@ -42,9 +42,7 @@
inline void requestRoutesBiosReset(App& app)
{
BMCWEB_ROUTE(app, "/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios/")
- // Incorrect Privilege; Should be ConfigureComponents
- //.privileges(redfish::privileges::postBios)
- .privileges({{"ConfigureManager"}})
+ .privileges(redfish::privileges::postBios)
.methods(boost::beast::http::verb::post)(
[](const crow::Request&,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {