Admin should be owner of procedure to destroy it
This commit is contained in:
parent
409bed4080
commit
e468612d95
2 changed files with 12 additions and 4 deletions
|
@ -51,7 +51,7 @@ class Admin::ProceduresController < AdminController
|
|||
end
|
||||
|
||||
def destroy
|
||||
procedure = Procedure.find(params[:id])
|
||||
procedure = current_administrateur.procedures.find(params[:id])
|
||||
|
||||
return render json: {}, status: 401 if procedure.publiee_ou_archivee?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue