summaryrefslogtreecommitdiff
path: root/lib/chef/knife/user_edit.rb
diff options
context:
space:
mode:
authorsnehaldwivedi <sdwivedi@msystechnologies.com>2021-02-15 21:30:28 -0800
committersnehaldwivedi <sdwivedi@msystechnologies.com>2021-02-16 02:45:13 -0800
commit6a3587867d17b9d8d5d8ea0f9279c3e522f0ea71 (patch)
tree5117e08efc39ac07c1adcf19e6161c0947ee9711 /lib/chef/knife/user_edit.rb
parent8f32723295c4ef04724270a4d6e4b77e5caf7b3a (diff)
downloadchef-6a3587867d17b9d8d5d8ea0f9279c3e522f0ea71.tar.gz
Revert "Updated rest object URL and removed api_version 1"
This reverts commit 182d83672e231c470e0b33ed777306a72a6bd76a.
Diffstat (limited to 'lib/chef/knife/user_edit.rb')
-rw-r--r--lib/chef/knife/user_edit.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/knife/user_edit.rb b/lib/chef/knife/user_edit.rb
index 4c392603a6..fff8c6b70f 100644
--- a/lib/chef/knife/user_edit.rb
+++ b/lib/chef/knife/user_edit.rb
@@ -42,10 +42,10 @@ class Chef
ui.fatal("You must specify a user name")
exit 1
end
- original_user = rest.get("users/#{@user_name}")
+ original_user = root_rest.get("users/#{@user_name}")
edited_user = get_updated_user(original_user)
if original_user != edited_user
- result = rest.put("users/#{@user_name}", edited_user)
+ result = root_rest.put("users/#{@user_name}", edited_user)
ui.msg("Saved #{@user_name}.")
unless result["private_key"].nil?
if config[:filename]