Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F324363
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Nov 25, 7:26 PM
Size
1 KB
Mime Type
text/x-diff
Expires
Wed, Nov 27, 7:26 PM (1 d, 18 h)
Engine
blob
Format
Raw Data
Handle
156159
Attached To
rWEBDNS WebDNS (edet4)
View Options
diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb
index 1f5a649..cfb4319 100644
--- a/app/mailers/notification_mailer.rb
+++ b/app/mailers/notification_mailer.rb
@@ -1,39 +1,41 @@
class NotificationMailer < ActionMailer::Base
default from: WebDNS.settings[:mail_from]
+ ENVIRON_PREFIX = WebDNS.settings[:notifications_prefix] || 'webdns'
+
PREFIXES = {
create: 'Created',
update: 'Modified',
destroy: 'Deleted',
}
def notify_record(record:, context:, user:, admin:, others:, changes:)
@record = record
@context = context
@user = user
@admin = admin
@changes = changes
- mail(to: others, subject: "[webdns] [record] #{PREFIXES[context.to_sym]} #{record.to_short_dns}")
+ mail(to: others, subject: "[#{ENVIRON_PREFIX}] [record] #{PREFIXES[context.to_sym]} #{record.to_short_dns}")
end
def notify_record_bulk(domain:, user:, admin:, others:, operations:)
@domain = domain
@user = user
@admin = admin
@operations = operations
- mail(to: others, subject: "[webdns] [record] Bulk operations for '#{domain.name}'")
+ mail(to: others, subject: "[#{ENVIRON_PREFIX}] [record] Bulk operations for '#{domain.name}'")
end
def notify_domain(domain:, context:, user:, admin:, others:, changes:)
@domain = domain
@context = context
@user = user
@admin = admin
@changes = changes
- mail(to: others, subject: "[webdns] [domain] #{PREFIXES[context.to_sym]} #{domain.name}")
+ mail(to: others, subject: "[#{ENVIRON_PREFIX}] [domain] #{PREFIXES[context.to_sym]} #{domain.name}")
end
end
Event Timeline
Log In to Comment