Class: Serverkit::Resources::User
- Defined in:
- lib/serverkit/resources/user.rb
Instance Attribute Summary
Attributes inherited from Base
#attributes, #backend, #check_result, #recheck_result, #recipe
Instance Method Summary collapse
Methods inherited from Base
abstract_class?, #all_errors, attribute, #check_command, #check_command_from_identifier, #get_command_from_identifier, #handlers, #id, #initialize, #notifiable?, #run_apply, #run_check, #successful?, #successful_on_check?, #successful_on_recheck?, #to_a
Constructor Details
This class inherits a constructor from Serverkit::Resources::Base
Instance Method Details
#apply ⇒ Object
Note:
Override
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/serverkit/resources/user.rb', line 16 def apply if has_correct_user? update_user_encrypted_password unless has_correct_password? update_user_gid unless has_correct_gid? update_user_home_directory unless has_correct_home_directory? update_user_login_shell unless has_correct_login_shell? update_user_uid unless has_correct_uid? else add_user end end |
#check ⇒ Object
Note:
Override
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/serverkit/resources/user.rb', line 29 def check if !has_correct_user? false elsif !has_correct_gid? false elsif !has_correct_home_directory? false elsif !has_correct_password? false elsif !has_correct_login_shell? false elsif !has_correct_uid? false else true end end |