Add ability for admins to delete canonical email blocks (#16644)
* Add admin option to remove canonical email blocks from a deleted account * Add tootctl canonical_email_blocks to inspect and remove canonical email blocks
This commit is contained in:
parent
7f803c41e2
commit
76761d5fc0
11 changed files with 128 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue