0
0
Fork 0

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:
Claire 2021-12-17 23:02:14 +01:00 committed by GitHub
parent 7f803c41e2
commit 76761d5fc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 128 additions and 2 deletions

View file

@ -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