summaryrefslogtreecommitdiff
path: root/redfish-core
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-03-25 05:14:03 +0300
committerEd Tanous <ed@tanous.net>2022-04-05 22:12:29 +0300
commite7b1b62b39ba31ba368c42cb6f4fa7af43c65961 (patch)
tree94183879a4600cf9189be321708bec7d232472c8 /redfish-core
parent142ec9aeb70c23a1aa98aa90d472ff11a76529ee (diff)
downloadbmcweb-e7b1b62b39ba31ba368c42cb6f4fa7af43c65961.tar.xz
Fix missing success code in Account PATCH
Everywhere else in this file, we return messages::success when a property is patched, except for the password success case. This normally wouldn't matter much, but redfish-protocol-validator seems to want to use Password setting as its check for a number of protocol tests (probably because all Redfish implementations have settable passwords). This commit adds the appropriate message Tested: curl -vvvv --insecure --user root:0penBmc -X PATCH -d '{"Password": "0penBmc1"}' https://192.168.7.2/redfish/v1/AccountService/Accounts/root Now returns the Success message from the message registry. Redfish-protocol-validator PROTO_JSON_ACCEPTED tests now succeed, improving bmcwebs protocol score by 3 tests passing that were failing. Counts are 356 passing, 27 failed, 36 not tested. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Iff1096ca590f956b29b2a3dd6c9510d2fe4a0037
Diffstat (limited to 'redfish-core')
-rw-r--r--redfish-core/lib/account_service.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 4fcd540057..6e7cf288be 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -1169,6 +1169,10 @@ inline void updateUserProperties(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
messages::internalError(asyncResp->res);
return;
}
+ else
+ {
+ messages::success(asyncResp->res);
+ }
}
if (enabled)