summaryrefslogtreecommitdiff
path: root/lib/chef/knife/user_edit.rb
diff options
context:
space:
mode:
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]