~ubuntu-branches/ubuntu/vivid/moin/vivid

« back to all changes in this revision

Viewing changes to docs/resetpw/wikiconfig-note-snippet.txt

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-01-07 21:33:21 UTC
  • mfrom: (0.1.34 sid)
  • Revision ID: package-import@ubuntu.com-20140107213321-574mr13z2oebjgms
Tags: 1.9.7-1ubuntu1
* Merge with Debian; remaining changes:
* debian/control:
  - remove python-xml from Suggests field, the package isn't in
    sys.path any more.
  - demote fckeditor from Recommends to Suggests; the code was previously
    embedded in moin, but it was also disabled, so there's no reason for us
    to pull this in by default currently. Note: fckeditor has a number of
    security problems and so this change probably needs to be carried
    indefinitely.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
    # you can put this into your wiki config, please be careful with
 
2
    # indentation, it needs to be in the Config class, indented as all
 
3
    # the other config attributes.
 
4
    # it will display a red box above your wiki theme then, notifying
 
5
    # not-logged-in users of the password invalidation, point them to
 
6
    # the information page on the MoinMoin project wiki.
 
7
 
 
8
    def important_note(self, request):
 
9
        html = ""
 
10
        if not request.user.valid:
 
11
            url = "http://moinmo.in/PasswordReset"
 
12
            reason = """
 
13
<u>Please note:</u>
 
14
All passwords were invalidated, you need to do a password recovery once
 
15
to define a NEW and DIFFERENT password.
 
16
For more information, please <a href="%(url)s">see there</a>.
 
17
""" % locals()
 
18
            html = """
 
19
<div style="border:red; border-style:dotted; padding:0.5em; background-color:#FFCCCC;">
 
20
%(reason)s
 
21
</div>
 
22
""" % locals()
 
23
        return html
 
24
 
 
25
    page_header1 = important_note
 
26