# Copyright: 2000-2004 Juergen Hermann <email@example.com>
-# Copyright: 2003-2008,2011 MoinMoin:ThomasWaldmann
+# Copyright: 2003-2008,2011- MoinMoin:ThomasWaldmann
# Copyright: 2003 Gustavo Niemeyer
# Copyright: 2005 Oliver Graf
# Copyright: 2007 Alexander Schremmer
MoinMoin - Wiki Security Interface and Access Control Lists
-This implements the basic interface for user permissions and
-system policy. If you want to define your own policy, inherit
-from the base class 'Permissions', so that when new permissions
-are defined, you get the defaults.
-Then assign your new class to "SecurityPolicy" in wikiconfig;
-and I mean the class, not an instance of it!
- """ Basic interface for user permissions and system policy.
+ """Basic interface for user permissions and system policy.
- Note that you still need to allow some of the related actions, this
- just controls their behavior, not their activation.
+ If you want to define your own policy, inherit from DefaultSecurityPolicy,
+ so that when new permissions are defined later, you will inherit their
- When sub classing this class, you must extend the class methods, not
- replace them, or you might break the ACLs in the wiki.
- Correct sub classing looks like this::
+ Then assign your new class (not an instance!) to "SecurityPolicy" in the
+ When subclassing this class, you must extend the class methods, not replace
+ them, or you might break the ACLs in the wiki.
+ Correct subclassing looks like this::
+ class MySecPol(DefaultSecurityPolicy):
def read(self, itemname):
# Your special security rule
# Do not just return True or you break (ignore) ACLs!
# This call will return correct permissions by checking ACLs:
+ return .read(itemname)
def __init__(self, user):
-# make an alias for the default policy
Access Control List - controls who may do what.