bmcweb: Fix some errors in Redfish Sessions
Two errors were identified in the Redfish sessions implementation.
1. All user "roles" return a description containing Adminstrator,
instead of containing the name of the role.
2. The SessionService implementation was missing the link to sessions
collection.
These are resolved in this commit.
Tested By:
Ran service validator, no errors.
Change-Id: Ib48ab1756d78724b4bab124c8cf135c8a61d94a6
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp
index addb287..59805a0 100644
--- a/redfish-core/lib/redfish_sessions.hpp
+++ b/redfish-core/lib/redfish_sessions.hpp
@@ -235,6 +235,9 @@
.getTimeoutInSeconds();
res.jsonValue["ServiceEnabled"] = true;
+ res.jsonValue["Sessions"] = {
+ {"@odata.id", "/redfish/v1/SessionService/Sessions"}};
+
res.end();
}
};
diff --git a/redfish-core/lib/roles.hpp b/redfish-core/lib/roles.hpp
index d07208e..b5deed1 100644
--- a/redfish-core/lib/roles.hpp
+++ b/redfish-core/lib/roles.hpp
@@ -108,7 +108,7 @@
{"@odata.type", "#Role.v1_0_2.Role"},
{"@odata.context", "/redfish/v1/$metadata#Role.Role"},
{"Name", "User Role"},
- {"Description", "Administrator User Role"},
+ {"Description", roleId + " User Role"},
{"OemPrivileges", nlohmann::json::array()},
{"IsPredefined", true},
{"Id", roleId},