Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions lib/itamae/resource/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class User < Base
define_attribute :gid, type: [Integer, String]
define_attribute :home, type: String
define_attribute :password, type: String
define_attribute :sensitive, default: false
define_attribute :system_user, type: [TrueClass, FalseClass]
define_attribute :uid, type: Integer
define_attribute :shell, type: String
Expand Down Expand Up @@ -35,6 +36,16 @@ def set_current_attributes
end
end

def show_differences
saved_password = @current_attributes[:password]
saved_attr_password = @attributes[:password]
@current_attributes[:password] = nil
@attributes[:password] = nil
super
@current_attributes[:password] = saved_password
@attributes[:password] = saved_attr_password
end

def action_create(options)
if run_specinfra(:check_user_exists, attributes.username)
if attributes.uid && attributes.uid != current.uid
Expand Down
Loading