diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/admin/action_log_filter.rb | 2 | ||||
-rw-r--r-- | app/models/canonical_email_block.rb | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/models/admin/action_log_filter.rb b/app/models/admin/action_log_filter.rb index 2af9d7c9c..12136223b 100644 --- a/app/models/admin/action_log_filter.rb +++ b/app/models/admin/action_log_filter.rb @@ -26,6 +26,7 @@ class Admin::ActionLogFilter destroy_domain_allow: { target_type: 'DomainAllow', action: 'destroy' }.freeze, destroy_domain_block: { target_type: 'DomainBlock', action: 'destroy' }.freeze, destroy_email_domain_block: { target_type: 'EmailDomainBlock', action: 'destroy' }.freeze, + destroy_instance: { target_type: 'Instance', action: 'destroy' }.freeze, destroy_unavailable_domain: { target_type: 'UnavailableDomain', action: 'destroy' }.freeze, destroy_status: { target_type: 'Status', action: 'destroy' }.freeze, disable_2fa_user: { target_type: 'User', action: 'disable' }.freeze, @@ -49,6 +50,7 @@ class Admin::ActionLogFilter update_announcement: { target_type: 'Announcement', action: 'update' }.freeze, update_custom_emoji: { target_type: 'CustomEmoji', action: 'update' }.freeze, update_status: { target_type: 'Status', action: 'update' }.freeze, + unblock_email_account: { target_type: 'Account', action: 'unblock_email' }.freeze, }.freeze attr_reader :params diff --git a/app/models/canonical_email_block.rb b/app/models/canonical_email_block.rb index be8c45bfe..94781386c 100644 --- a/app/models/canonical_email_block.rb +++ b/app/models/canonical_email_block.rb @@ -24,4 +24,8 @@ class CanonicalEmailBlock < ApplicationRecord def self.block?(email) where(canonical_email_hash: email_to_canonical_email_hash(email)).exists? end + + def self.find_blocks(email) + where(canonical_email_hash: email_to_canonical_email_hash(email)) + end end |