mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
Change email unlink validation to allow "unknown" source emails to unlink (#699)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user