diff options
-rw-r--r-- | redfish-core/include/privileges.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/redfish-core/include/privileges.hpp b/redfish-core/include/privileges.hpp index 61253b8..423f95b 100644 --- a/redfish-core/include/privileges.hpp +++ b/redfish-core/include/privileges.hpp @@ -192,12 +192,18 @@ inline const Privileges& getUserPrivileges(const std::string& userRole) static Privileges op{"Login", "ConfigureSelf", "ConfigureComponents"}; return op; } - else + else if (userRole == "priv-user") { // Redfish privilege : Readonly static Privileges readOnly{"Login", "ConfigureSelf"}; return readOnly; } + else + { + // Redfish privilege : NoAccess + static Privileges noaccess; + return noaccess; + } } using OperationMap = boost::container::flat_map<boost::beast::http::verb, |