Commits

Thomas Waldmann committed 7fcca56 Merge

merged

Comments (0)

Files changed (1)

MoinMoin/apps/frontend/views.py

         TextCha(form).amend_form()
         if form.validate():
             comment = form['comment'].value
-            item.delete(comment)
+            try:
+                item.delete(comment)
+            except AccessDenied:
+                abort(403)
             return redirect(url_for_item(item_name))
     return render_template(item.delete_template,
                            item=item, item_name=item_name,
         TextCha(form).amend_form()
         if form.validate():
             comment = form['comment'].value
-            item.destroy(comment=comment, destroy_item=destroy_item)
+            try:
+                item.destroy(comment=comment, destroy_item=destroy_item)
+            except AccessDenied:
+                abort(403)
             return redirect(url_for_item(item_name))
     return render_template(item.destroy_template,
                            item=item, item_name=item_name,