Project

General

Profile

« Previous | Next » 

Revision 19579f87

Added by Martin Ducar about 10 years ago

fixes #4524 - The logged in user should be the default one in create new hosts

View differences:

app/models/host/managed.rb
end
def set_default_user
return unless OWNER_TYPES.include?(self.owner_type)
return if self.owner_type.present? && !OWNER_TYPES.include?(self.owner_type)
self.owner_type ||= 'User'
self.owner ||= User.current
end

Also available in: Unified diff