diff MoinMoin/action/edit.py @ 1573:1453513eaa7e

use tickets for editing, cfg.edit_ticketing, make tickets more safe, invalidate old tickets
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 18 Sep 2006 21:54:59 +0200
parents 8bfaae6fa0a5
children 6478c7744221
line wrap: on
line diff
--- a/MoinMoin/action/edit.py	Mon Sep 18 21:31:27 2006 +0200
+++ b/MoinMoin/action/edit.py	Mon Sep 18 21:54:59 2006 +0200
@@ -78,6 +78,13 @@
     # did user hit cancel button?
     cancelled = request.form.has_key('button_cancel')
 
+    if request.cfg.edit_ticketing:
+        ticket = request.form.get('ticket', [''])[0]
+        if not wikiutil.checkTicket(request, ticket):
+            msg = _('Please use the interactive user interface to use action %(actionname)s!') % {'actionname': 'edit' }
+            pg.send_page(request, msg=msg)
+            return
+
     # convert input from Graphical editor
     from MoinMoin.converter.text_html_text_moin_wiki import convert, ConvertError
     try: