Class: Willpower::Members
- Inherits:
-
Thor
- Object
- Thor
- Willpower::Members
- Defined in:
- lib/willpower/commands/users.rb
Instance Method Summary collapse
Instance Method Details
#invite(login) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/willpower/commands/users.rb', line 4 def invite(login) error_checking_users find_user(login) if @users_array.include?(login) RestClient.put "#{CONFIG['current_remote']}/api/v1/userproject/#{login}", project: CONFIG["current_project"], current_user: CONFIG["current_user"], new_user: login say "Successfully added new user!" else say "There is no such user!" end end |
#role(login) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/willpower/commands/users.rb', line 17 def role(login) error_checking_users RestClient.put"#{CONFIG['current_remote']}/api/v1/users/#{login}", project_id: CONFIG["current_project_id"], name: login, role_id: role_type say "Successfully updated user's role!" end |