Fix: NoAccess priv is tied with empty priv attr
SetUserAccess command must accept NoAccess privilege
and update user-manager with empty privilege attribute
for that user.
Unit-test:
verified it using following command, and access marked
as NoAccess when queriying user list
ipmitool raw 6 0x43 0x91 0x1 0x0f 0x00
Change-Id: Id63061edfc7777b7cb88c2cd7c693ea0b98c7949
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp
index eb95163..3f82c15 100644
--- a/user_channel/user_mgmt.cpp
+++ b/user_channel/user_mgmt.cpp
@@ -686,10 +686,6 @@
}
std::string priv = convertToSystemPrivilege(
static_cast<CommandPrivilege>(privAccess.privilege));
- if (priv.empty())
- {
- return IPMI_CC_PARM_OUT_OF_RANGE;
- }
uint8_t syncIndex = getUsrMgmtSyncIndex();
if (chNum == syncIndex &&
privAccess.privilege != userInfo->userPrivAccess[syncIndex].privilege)