~ubuntu-branches/ubuntu/hardy/moin/hardy

« back to all changes in this revision

Viewing changes to wiki/underlay/pages/HelpOnConfiguration(2f)SecurityPolicy/revisions/00000001

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-05-14 15:55:15 UTC
  • mfrom: (0.4.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070514155515-apl4srcch40h9fcx
Tags: 1.5.7-3ubuntu1
* Merge from debian unstable, remaining changes:
  - 11000_show_traceback_toggle.patch: allow for 'show_traceback=0' in
    Moin configurations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
Then either assign your new class to `Config.SecurityPolicy` in `wikiconfig.py` (and I mean the class, not an instance of it), or define your class as a member of `class Config` in `wikiconfig.py` and name it `SecurityPolicy`.
17
17
 
 
18
== Anti-Spam protection ==
 
19
 
 
20
If you enable the "antispam" utility your wiki will fetch the page MoinMaster:BadContent and keep automatically in sync with the original version. Do not edit it, because your edits will be overwritten.
 
21
 
 
22
Add this at the beginning of your wikiconfig:
 
23
 
 
24
{{{
 
25
from MoinMoin.util.antispam import SecurityPolicy
 
26
}}}
 
27
 
 
28
== SSL-only Write ==
 
29
 
 
30
If you want for security reasons that users do not edit the wiki without using SSL you should add:
 
31
 
 
32
{{{
 
33
# add this at the of your config settings:
 
34
from MoinMoin.security import Permissions
 
35
 
 
36
   # add this later , careful with indentation
 
37
   # make wiki only writeable via SSL
 
38
    class SecurityPolicy(Permissions):
 
39
        def write(self, pagename):
 
40
                return (self.request.is_ssl
 
41
                        and Permissions.write(self, pagename)
 
42
}}}
18
43
 
19
44
== Samples ==
20
45
 
21
46
For samples on using this mechanism, see MoinMoin:SecurityPolicy.
 
47
 
 
48
 
 
49
== See also ==
 
50
 
 
51
 * HelpOnAutoAdmin when you want to give some users or user groups admin rights on some pages.