Change email unlink validation to allow "unknown" source emails to unlink (#699)

This commit is contained in:
Arca Ege Cengiz 2025-12-10 00:03:35 +00:00 committed by GitHub
parent 385bea56f7
commit 9dd246a80a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,8 +16,7 @@ class EmailAddress < ApplicationRecord
before_validation :downcase_email
def can_unlink?
# only allow unlinking if signin email
self.source_signing_in?
!(self.source_github? || self.source_slack? || self.source_preserved_for_deletion?)
end
private