Renamed User role name to ReadOnly
As per redfish specification (DSP0266), there are
set of predefined privilege roles. In OpenBMC code
has "User" as role name instead of "ReadOnly".
So corrected the same. Updated Redfish.md accordingly.
Spec says:
Role Name = "ReadOnly"
▪ AssignedPrivileges = Login, ConfigureSelf
Tested:
- Role collection shows new role.
- GET on /redfish/v1/AccountService/Roles/ReadOnly
URI shows correct AssignedPrivileges.
- Ran negative test with /redfish/v1/AccountService/Roles/User
and observed error(404 - Not Found).
- Ran Redfish validator and no new issues observed.
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Change-Id: I7b0132c628fb4950b6ec095269cd1a12e92aea9a
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index a183f68..7f34949 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -84,7 +84,7 @@
}
else if (role == "priv-user")
{
- return "User";
+ return "ReadOnly";
}
else if (role == "priv-operator")
{
@@ -102,7 +102,7 @@
{
return "priv-callback";
}
- else if (role == "User")
+ else if (role == "ReadOnly")
{
return "priv-user";
}