tells if a user can be deleted
This commit is contained in:
parent
8d2d66a2b6
commit
58ef36ff57
2 changed files with 20 additions and 0 deletions
|
@ -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!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue