FIX: wizard should only include human admins and system user as the site contact username options

This commit is contained in:
Neil Lalonde 2017-08-11 15:29:07 -04:00
parent 51f9c23e48
commit c924975086
1 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,8 @@ class Wizard
username = Discourse.system_user.username if username.blank?
contact = step.add_field(id: 'site_contact', type: 'dropdown', value: username)
User.where(admin: true).pluck(:username).each { |c| contact.add_choice(c) }
User.human_users.where(admin: true).pluck(:username).each { |c| contact.add_choice(c) }
contact.add_choice(Discourse.system_user.username)
step.on_update do |updater|
updater.apply_settings(:contact_email, :contact_url)