changeset 2268:9ad7a108b511

Added fqname support to delete view.
author Ashutosh Singla <ashu1461@gmail.com>
date Wed, 11 Sep 2013 23:15:03 +0530
parents 9c177f0ba6c3
children 494166b34798
files MoinMoin/apps/frontend/views.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Wed Sep 11 22:59:20 2013 +0530
+++ b/MoinMoin/apps/frontend/views.py	Wed Sep 11 23:15:03 2013 +0530
@@ -44,7 +44,7 @@
 logging = log.getLogger(__name__)
 
 from MoinMoin.i18n import _, L_, N_
-from MoinMoin.themes import render_template, contenttype_to_class
+from MoinMoin.themes import render_template, contenttype_to_class, get_editor_info
 from MoinMoin.apps.frontend import frontend
 from MoinMoin.forms import (OptionalText, RequiredText, URL, YourOpenID, YourEmail, RequiredPassword, Checkbox,
                             InlineCheckbox, Select, Names, Tags, Natural, Hidden, MultiSelect, Enum, validate_name,
@@ -634,7 +634,7 @@
         item = Item.create(item_name)
     except AccessDenied:
         abort(403)
-    if not flaskg.user.may.write(item_name):
+    if not flaskg.user.may.write(item.fqname):
         abort(403)
     if isinstance(item, NonExistent):
         abort(404, item_name)
@@ -653,6 +653,7 @@
             return redirect(url_for_item(item_name))
     return render_template(item.delete_template,
                            item=item, item_name=item_name,
+                           fqname=split_fqname(item_name),
                            form=form,
     )