summaryrefslogtreecommitdiff
path: root/app/models/notification_setting.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/notification_setting.rb')
-rw-r--r--app/models/notification_setting.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/notification_setting.rb b/app/models/notification_setting.rb
index 981590b688f..2b3443f24d7 100644
--- a/app/models/notification_setting.rb
+++ b/app/models/notification_setting.rb
@@ -25,6 +25,7 @@ class NotificationSetting < ApplicationRecord
end
EMAIL_EVENTS = [
+ :new_release,
:new_note,
:new_issue,
:reopen_issue,
@@ -46,6 +47,10 @@ class NotificationSetting < ApplicationRecord
EMAIL_EVENTS
end
+ def self.allowed_fields(source = nil)
+ NotificationSetting.email_events(source).dup + %i(level notification_email)
+ end
+
def email_events
self.class.email_events(source)
end