-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'staging' into feature/agenda-clean
- Loading branch information
Showing
14 changed files
with
27 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ def create_global_archive_user | |
|
||
User.create!(id: ARCHIVE_USER_ID, | ||
username: 'archived.user', | ||
email: '[email protected]', | ||
email: Rails.application.config.x.ict_email, | ||
first_name: 'Gearchiveerde', | ||
last_name: 'Gebruiker', | ||
address: 'Onbekend', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
class ApplicationMailer < ActionMailer::Base | ||
default from: '[email protected]' | ||
default from: Rails.application.config.x.noreply_email | ||
layout 'mailer' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,14 @@ def enabled_email(mail_alias, password) | |
# since we do not want to send the password to mail management | ||
def notify_management_enable_email(mail_alias) | ||
@mail_alias = mail_alias | ||
mail to: '[email protected]', | ||
mail to: Rails.application.config.x.mailbeheer_email, | ||
subject: "SMTP account voor #{mail_alias.email} aangemaakt" | ||
end | ||
|
||
# Mail to notify the user and mail management that their SMTP is removed | ||
def disabled_email(mail_alias) | ||
@mail_alias = mail_alias | ||
mail to: '[email protected]', bcc: mail_alias.mail_addresses, | ||
mail to: Rails.application.config.x.mailbeheer_email, bcc: mail_alias.mail_addresses, | ||
subject: "SMTP account voor #{mail_alias.email} opgeheven" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ def cleanup_email(will_archive_users, archived_users) | |
' staan op het punt gearchiveerd te worden' | ||
subject = 'Er zijn gebruikers gearchiveerd!' if @will_archive_users.empty? | ||
|
||
mail to: '[email protected];[email protected]', subject: | ||
mail to: Rails.application.config.x.privacy_email, subject: | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ def privacy_notification_email(exporting_user, group, fields, description) | |
@group = group | ||
@fields = fields | ||
@description = description | ||
mail to: '[email protected]', subject: '[Privacy] Er is een database-export gemaakt' # rubocop:disable Rails/I18nLocaleTexts | ||
mail to: Rails.application.config.x.privacy_email, | ||
subject: '[Privacy] Er is een database-export gemaakt' # rubocop:disable Rails/I18nLocaleTexts | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
U heeft geprobeerd een mail te versturen naar een @csvalpha.nl mailadres. Deze kan helaas niet bezorgd worden. Het gebruikte mailadres <b><%= @to %></b> is namelijk niet in gebruik. Controleer het mailadres nogmaals. | ||
<br/><br/> | ||
|
||
Mocht u zeker zijn dat het mailadres klopt of niet weten welk mailadres u moet gebruiken kunt u mailen naar [email protected] | ||
Mocht u zeker zijn dat het mailadres klopt of niet weten welk mailadres u moet gebruiken kunt u mailen naar <a href="mailto:<%= Rails.application.config.x.ict_email %>" style="color: #adb5bd"><%= Rails.application.config.x.ict_email %></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
Uw bericht met als onderwerp "<%= @subject %>" aan "<%= @to %>" is helaas niet succesvol afgeleverd.<br/> | ||
De reden hiervoor is: <b><%= @reason %></b>. Mocht dit een bericht aan een mailgroep zijn kan het ook zijn dat het bericht maar bij één ontvanger niet is aangekomen.<br/><br/> | ||
|
||
Voor meer vragen kunt u mailen naar [email protected] | ||
Voor meer vragen kunt u mailen naar <a href="mailto:<%= Rails.application.config.x.ict_email %>" style="color: #adb5bd"><%= Rails.application.config.x.ict_email %></a> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
- <%= user.full_name %> | ||
<% end %><br/><br/> | ||
|
||
Vergeet niet de lidmaatschapsformulieren van deze leden te vernietigd. Als dit gebeurd is zouden we dan op de hoogte kunnen worden gebracht door middel van een mailtje naar [email protected]. | ||
Vergeet niet de lidmaatschapsformulieren van deze leden te vernietigd. Als dit gebeurd is zouden we dan op de hoogte kunnen worden gebracht door middel van een mailtje naar <%= Rails.application.config.x.privacy_email %>. | ||
|
||
<% end %> | ||
<br/> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,5 +81,10 @@ class Application < Rails::Application | |
config.x.google_api_key = credentials.dig(Rails.env.to_sym, :google_api_key) | ||
|
||
config.x.healthcheck_ids = credentials.dig(Rails.env.to_sym, :healthcheck_ids) | ||
|
||
config.x.noreply_email = ENV.fetch('NOREPLY_EMAIL', '[email protected]') | ||
config.x.ict_email = ENV.fetch('ICT_EMAIL', '[email protected]') | ||
config.x.privacy_email = ENV.fetch('PRIVACY_EMAIL', '[email protected]') | ||
config.x.mailbeheer_email = ENV.fetch('PRIVACY_EMAIL', '[email protected]') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
it { expect(mail.bcc).to eq mail_alias.mail_addresses } | ||
it { expect(mail.subject).to eq "Je kunt nu mail versturen vanaf #{mail_alias.email}!" } | ||
|
||
it { expect(management_mail.to).to eq ['[email protected]'] } | ||
it { expect(management_mail.to).to eq [Rails.application.config.x.mailbeheer_email] } | ||
|
||
it { | ||
expect(management_mail.subject).to eq "SMTP account voor #{mail_alias.email} aangemaakt" | ||
|
@@ -47,7 +47,7 @@ | |
|
||
it { expect(client).to have_received(:delete_smtp) } | ||
it { expect(mail.bcc).to eq mail_alias.mail_addresses } | ||
it { expect(mail.to).to eq ['[email protected]'] } | ||
it { expect(mail.to).to eq [Rails.application.config.x.mailbeheer_email] } | ||
it { expect(mail.subject).to eq "SMTP account voor #{mail_alias.email} opgeheven" } | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,8 +35,7 @@ | |
|
||
context 'when with will archive and archived users' do | ||
it { expect(ActionMailer::Base.deliveries.count).to eq 1 } | ||
it { expect(email.to).to include '[email protected]' } | ||
it { expect(email.to).to include '[email protected]' } | ||
it { expect(email.to).to include Rails.application.config.x.privacy_email } | ||
it { expect(email.body.to_s).to include(almost_archive_user.full_name) } | ||
it { expect(email.body.to_s).not_to include(user.full_name) } | ||
it { expect(email.body.to_s).to include('Er is 1 gebruiker gearchiveerd.') } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
end | ||
|
||
it { expect(ActionMailer::Base.deliveries.count).to eq 1 } | ||
it { expect(privacy_notification_email.to.first).to eq '[email protected]' } | ||
it { expect(privacy_notification_email.to).to eq [Rails.application.config.x.privacy_email] } | ||
it { expect(privacy_notification_email.body.to_s).to include(exporting_user.full_name) } | ||
it { expect(privacy_notification_email.body.to_s).to include(group.name) } | ||
it { expect(privacy_notification_email.body.to_s).to include(fields.join(', ')) } | ||
|