Commits

Anonymous committed 4adea82

Ported [4088] to 0.10-stable (''enforce WIKI_VIEW permission, #4042'')

Comments (0)

Files changed (1)

trac/wiki/web_ui.py

         elif action == 'history':
             self._render_history(req, db, page)
         else:
+            req.perm.assert_permission('WIKI_VIEW')            
             format = req.args.get('format')
             if format:
                 Mimeview(self.env).send_converted(req, 'text/x-trac-wiki',
         req.hdf['wiki.history'] = history
 
     def _render_view(self, req, db, page):
-        req.perm.assert_permission('WIKI_VIEW')
-
         page_name = self._set_title(req, page, '')
         if page.name == 'WikiStart':
             req.hdf['title'] = ''