summaryrefslogtreecommitdiff
path: root/app/mailers/emails/members.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/mailers/emails/members.rb')
-rw-r--r--app/mailers/emails/members.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/mailers/emails/members.rb b/app/mailers/emails/members.rb
index 6954fd46850..8a9ed557cc6 100644
--- a/app/mailers/emails/members.rb
+++ b/app/mailers/emails/members.rb
@@ -43,9 +43,13 @@ module Emails
user = User.find(user_id)
+ @source_hidden = !member_source.readable_by?(user)
+
+ human_name = @source_hidden ? 'Hidden' : member_source.human_name
+
member_email_with_layout(
to: user.notification_email_for(notification_group),
- subject: subject("Access to the #{member_source.human_name} #{member_source.model_name.singular} was denied"))
+ subject: subject("Access to the #{human_name} #{member_source.model_name.singular} was denied"))
end
def member_invited_email(member_source_type, member_id, token)