Class: OpscodeAcl::UserDissociate
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- OpscodeAcl::UserDissociate
- Defined in:
- lib/chef/knife/user_dissociate.rb
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/chef/knife/user_dissociate.rb', line 24 def run if name_args.length < 1 show_usage ui.fatal("You must specify a username.") exit 1 end users = name_args ui.confirm("Are you sure you want to dissociate the following users: #{users.join(', ')}") users.each do |u| api_endpoint = "users/#{u}" rest.delete_rest(api_endpoint) end end |