Class: DInstallerCli::Commands::User
- Inherits:
-
Thor
- Object
- Thor
- DInstallerCli::Commands::User
- Defined in:
- lib/dinstaller_cli/commands/user.rb
Overview
Subcommand to manage first user settings
Instance Method Summary collapse
Instance Method Details
#clear ⇒ Object
54 55 56 |
# File 'lib/dinstaller_cli/commands/user.rb', line 54 def clear client.remove_first_user end |
#set(name) ⇒ Object
34 35 36 37 38 39 |
# File 'lib/dinstaller_cli/commands/user.rb', line 34 def set(name) client.create_first_user(name, fullname: [:fullname], password: [:password], autologin: [:autologin]) end |
#show ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/dinstaller_cli/commands/user.rb', line 42 def show full_name, name, autologin = client.first_user return if name.empty? say("Full Name: #{full_name}\n" \ "Name: #{name}\n" \ "Autologin: #{autologin ? "yes" : "no"}\n" \ "Password: <secret>") end |