changeset 2130:283530fa9c52

avoid acl KeyError for xml/xslt pages (ported from 1.6)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 16 Jun 2007 21:57:38 +0200
parents 5e47b9a9df08
children 2941aad83666
files MoinMoin/Page.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Fri Jun 15 22:13:51 2007 +0200
+++ b/MoinMoin/Page.py	Sat Jun 16 21:57:38 2007 +0200
@@ -885,13 +885,16 @@
         """
         from MoinMoin import i18n
         from MoinMoin import security
+        request = self.request
         pi = {} # we collect the processing instructions here
-    
+
         body = self.body
+        # TODO: remove this hack once we have separate metadata and can use mimetype there
         if body.startswith('<?xml'): # check for XML content
             pi['lines'] = 0
             pi['format'] = "xslt"
             pi['formatargs'] = ''
+            pi['acl'] = security.AccessControlList(request.cfg, []) # avoid KeyError on acl check
             return pi
 
         meta = self.meta
@@ -900,7 +903,6 @@
         pi['format'] = self.cfg.default_markup or "wiki"
         pi['formatargs'] = ''
         pi['lines'] = len(meta)
-        request = self.request
         acl = []
         
         for verb, args in meta: