mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-19 22:15:14 +00:00
Change email unlink validation to allow "unknown" source emails to unlink (#699)
This commit is contained in:
parent
385bea56f7
commit
9dd246a80a
1 changed files with 1 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue