changeset 6062:17ccba0ae187

log additional detections of editing failure
author 'Karl O. Pinc' <kop@meme.com>
date Thu, 04 Sep 2014 10:49:26 -0500
parents 50251583a7bb
children c2e4df0f760f
files MoinMoin/PageEditor.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/PageEditor.py	Thu Sep 04 10:22:09 2014 -0500
+++ b/MoinMoin/PageEditor.py	Thu Sep 04 10:49:26 2014 -0500
@@ -169,8 +169,10 @@
 
         # check edit permissions
         if not request.user.may.write(self.page_name):
+            log_attempt('edit: edit', False, request)
             msg = _('You are not allowed to edit this page.')
         elif not self.isWritable():
+            log_attempt('edit: immutable', False, request)
             msg = _('Page is immutable!')
         elif self.rev:
             # Trying to edit an old version, this is not possible via
@@ -552,6 +554,7 @@
             return False, _("You can't copy to an empty pagename.")
 
         if not self.request.user.may.write(newpagename):
+            log_attempt('edit: copy', False, request)
             return False, _('You are not allowed to copy this page!')
 
         newpage = PageEditor(request, newpagename)