X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7153f88758f73a339673b399cd43dceae8c86e4f..5756eb031199c2ab015463292e7d24f3357c1852:/services/api/app/mailers/admin_notifier.rb diff --git a/services/api/app/mailers/admin_notifier.rb b/services/api/app/mailers/admin_notifier.rb index 2bb0aef7b3..87a5699f49 100644 --- a/services/api/app/mailers/admin_notifier.rb +++ b/services/api/app/mailers/admin_notifier.rb @@ -1,8 +1,11 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class AdminNotifier < ActionMailer::Base include AbstractController::Callbacks default from: Rails.configuration.admin_notifier_email_from - before_filter :load_variables def new_user(user) @user = user @@ -12,11 +15,11 @@ class AdminNotifier < ActionMailer::Base add_to_subject = '' if Rails.configuration.auto_setup_new_users - add_to_subject = @user.is_invited ? 'and setup' : ', but not setup' + add_to_subject = @user.is_invited ? ' and setup' : ', but not setup' end - + mail(to: @recipients, - subject: "#{Rails.configuration.email_subject_prefix}New user created #{add_to_subject} notification" + subject: "#{Rails.configuration.email_subject_prefix}New user created#{add_to_subject} notification" ) end end @@ -32,15 +35,4 @@ class AdminNotifier < ActionMailer::Base end end -private - def load_variables - if Rails.configuration.respond_to?('workbench_address') and - not Rails.configuration.workbench_address.nil? and - not Rails.configuration.workbench_address.empty? then - @wb_address = Rails.configuration.workbench_address.sub(/\/$/,'') + '/users' - else - @wb_address = '' - end - end - end