Class: Ohmage::CLI::Update

Inherits:
Thor
  • Object
show all
Defined in:
lib/ohmage/cli.rb

Instance Method Summary collapse

Instance Method Details

#password(username) ⇒ Object



150
151
152
# File 'lib/ohmage/cli.rb', line 150

def password(username)
  Ohmage.user_password(username: username, new_password: options[:password])
end

#user(username) ⇒ Object



139
140
141
142
143
144
145
146
# File 'lib/ohmage/cli.rb', line 139

def user(username)
  updated_user = Ohmage.user_update(username: username,
                                    admin: options[:admin],
                                    enabled: options[:enabled],
                                    user_setup_privilege: options[:user_setup],
                                    new_account: options[:new])
  Ohmage::CliHelpers.format_output(updated_user, options[:table], [:username, :admin, :enabled, :new_account], :username)
end