# address is used.
PreferDomainForUsername: ""
+ UserSetupMailText: |
+ <% if not @user.full_name.empty? -%>
+ <%= @user.full_name %>,
+ <% else -%>
+ Hi there,
+ <% end -%>
+
+ Your Arvados account has been set up. You can log in at
+
+ <%= Rails.configuration.Services.Workbench1.ExternalURL %>
+
+ Thanks,
+ Your Arvados administrator.
+
AuditLogs:
# Time to keep audit logs, in seconds. (An audit log is a row added
# to the "logs" table in the PostgreSQL database each time an
"Users.PreferDomainForUsername": false,
"Users.UserNotifierEmailFrom": false,
"Users.UserProfileNotificationAddress": false,
+ "Users.UserSetupMailText": false,
"Volumes": true,
"Volumes.*": true,
"Volumes.*.*": false,
# address is used.
PreferDomainForUsername: ""
+ UserSetupMailText: |
+ <% if not @user.full_name.empty? -%>
+ <%= @user.full_name %>,
+ <% else -%>
+ Hi there,
+ <% end -%>
+
+ Your Arvados account has been set up. You can log in at
+
+ <%= Rails.configuration.Services.Workbench1.ExternalURL %>
+
+ Thanks,
+ Your Arvados administrator.
+
AuditLogs:
# Time to keep audit logs, in seconds. (An audit log is a row added
# to the "logs" table in the PostgreSQL database each time an
UserNotifierEmailFrom string
UserProfileNotificationAddress string
PreferDomainForUsername string
+ UserSetupMailText string
}
Volumes map[string]Volume
Workbench struct {
vm_uuid: params[:vm_uuid])
# setup succeeded. send email to user
- if params[:send_notification_email]
+ if params[:send_notification_email] && !Rails.configuration.Users.UserSetupMailText.empty?
begin
UserNotifier.account_is_setup(@object).deliver_now
rescue => e
SPDX-License-Identifier: AGPL-3.0 %>
-<% if not @user.full_name.empty? -%>
-<%= @user.full_name %>,
-<% else -%>
-Hi there,
-<% end -%>
-
-Your Arvados shell account has been set up. Please visit the virtual machines page <% if Rails.configuration.Services.Workbench1.ExternalURL %>at
-
- <%= Rails.configuration.Services.Workbench1.ExternalURL %><%= "/" if !Rails.configuration.Services.Workbench1.ExternalURL.to_s.end_with?("/") %>users/<%= @user.uuid%>/virtual_machines <% else %><% end %>
-
-for connection instructions.
-
-Thanks,
-The Arvados team.
+<%= ERB.new(Rails.configuration.Users.UserSetupMailText, 0, "-").result(binding) %>
# Send the email, then test that it got queued
test "account is setup" do
user = users :active
+
+ Rails.configuration.Users.UserSetupMailText = %{
+<% if not @user.full_name.empty? -%>
+<%= @user.full_name %>,
+<% else -%>
+Hi there,
+<% end -%>
+
+Your Arvados shell account has been set up. Please visit the virtual machines page <% if Rails.configuration.Services.Workbench1.ExternalURL %>at
+
+<%= Rails.configuration.Services.Workbench1.ExternalURL %><%= "/" if !Rails.configuration.Services.Workbench1.ExternalURL.to_s.end_with?("/") %>users/<%= @user.uuid%>/virtual_machines <% else %><% end %>
+
+for connection instructions.
+
+Thanks,
+The Arvados team.
+}
+
email = UserNotifier.account_is_setup user
assert_not_nil email