changeset 1188:7fcca568fed1

merged
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 02 Jan 2012 04:39:31 +0100
parents 492fd5a8080d (current diff) 82a7411e0653 (diff)
children a52b5aa085da
files
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Mon Dec 26 10:42:46 2011 +0100
+++ b/MoinMoin/apps/frontend/views.py	Mon Jan 02 04:39:31 2012 +0100
@@ -493,7 +493,10 @@
         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,
@@ -589,7 +592,10 @@
         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,