empêche la suppression d'un user qui est admin
This commit is contained in:
parent
d8a51f986f
commit
d4de5769ee
4 changed files with 13 additions and 3 deletions
|
@ -97,7 +97,7 @@ class User < ApplicationRecord
|
|||
end
|
||||
|
||||
def can_be_deleted?
|
||||
dossiers.state_instruction_commencee.empty?
|
||||
administrateur.nil? && dossiers.state_instruction_commencee.empty?
|
||||
end
|
||||
|
||||
def delete_and_keep_track_dossiers(administration)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue