dossiers: allow users to delete "en construction" dossiers
This commit is contained in:
parent
d251ebc2f4
commit
a6704c4cd6
4 changed files with 7 additions and 3 deletions
|
@ -188,7 +188,7 @@ module NewUser
|
|||
def ask_deletion
|
||||
dossier = current_user.dossiers.includes(:user, procedure: :administrateur).find(params[:id])
|
||||
|
||||
if !dossier.instruction_commencee?
|
||||
if dossier.can_be_deleted_by_user?
|
||||
dossier.delete_and_keep_track
|
||||
flash.notice = 'Votre dossier a bien été supprimé.'
|
||||
redirect_to dossiers_path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue