tells if a user can be deleted

This commit is contained in:
Christophe Robillard 2020-01-06 17:33:09 +01:00 committed by clemkeirua
parent 8d2d66a2b6
commit 58ef36ff57
2 changed files with 20 additions and 0 deletions

View file

@ -96,6 +96,10 @@ class User < ApplicationRecord
last_sign_in_at.present?
end
def can_be_deleted?
dossiers.state_instruction_commencee.empty?
end
private
def link_invites!