1.1 --- a/actions/PostMessage.py Tue Nov 12 23:05:52 2013 +0100
1.2 +++ b/actions/PostMessage.py Wed Nov 13 15:42:06 2013 +0100
1.3 @@ -51,10 +51,21 @@
1.4 whether it will be placed in a message store.
1.5 """
1.6
1.7 + request = self.request
1.8 +
1.9 # Handle the different update actions.
1.10 # Update a message store for the page.
1.11
1.12 if to_store(update):
1.13 +
1.14 + # Add any authenticated user.
1.15 + # Note that where messages are signed by the real author, encrypted,
1.16 + # and then signed for sending, the authenticated user here is not
1.17 + # the real author.
1.18 +
1.19 + if request.user and request.user.valid:
1.20 + update["Moin-User"] = request.user.name
1.21 +
1.22 self.store.append(update.as_string())
1.23
1.24 # Update the page.
1.25 @@ -78,12 +89,12 @@
1.26 if not replace:
1.27 body.append(self.page.get_raw_body())
1.28
1.29 - page_editor = PageEditor(self.request, self.pagename)
1.30 + page_editor = PageEditor(request, self.pagename)
1.31 page_editor.saveText("\n\n".join(body), 0)
1.32
1.33 # Refresh the page.
1.34
1.35 - self.page = Page(self.request, self.pagename)
1.36 + self.page = Page(request, self.pagename)
1.37
1.38 # Action function.
1.39