* looking for arch@arch.thinkmo.de--2003-archives/moin--main--1.3--patch-556 to compare with
* comparing to arch@arch.thinkmo.de--2003-archives/moin--main--1.3--patch-556
M  MoinMoin/Page.py
M  MoinMoin/PageEditor.py
M  MoinMoin/multiconfig.py

* modified files

--- orig/MoinMoin/Page.py
+++ mod/MoinMoin/Page.py
@@ -1524,7 +1524,7 @@
                     return parent
         return None
 
-    def getACL(self, request):
+    def getACL(self, request, inherit=True):
         """ Get ACLs of this page.
 
         Page acl is cached for long running processes in the global
@@ -1533,6 +1533,8 @@
         pages, the previous revision is saved.
 
         @param request: the request object
+        @param inherit: should parent acl be inherited
+        @type inherit: bool
         @rtype: MoinMoin.wikiacl.AccessControlList
         @return: ACL of this page
         """
@@ -1556,13 +1558,19 @@
         key = (request.cfg.siteid, self.page_name)
         aclRevision, acl = _acl_cache.get(key, (None, None))
         
-        if aclRevision != revision or acl is None:
+        if (request.cfg.acl_inherit_parent and not inherit) or aclRevision != revision or acl is None:
             # Parse acl from page and save in cache
             if exists:
                 body = self.get_raw_body()
             else:
                 body = Page(request, self.page_name, rev=revision).get_raw_body()
             acl = wikiacl.parseACL(request, body)
+            if request.cfg.acl_inherit_parent and inherit:
+                parent = self.getParentPage()
+                if parent:
+                    pacl = parent.getACL(request)
+                    if pacl:
+                        acl.setLines(request.cfg, acl.acl_lines + pacl.acl_lines)
             _acl_cache[key] = (revision, acl)
         
         request.clock.stop('getACL')


--- orig/MoinMoin/PageEditor.py
+++ mod/MoinMoin/PageEditor.py
@@ -903,7 +903,7 @@
             # they are not the sames, the user must have admin
             # rights. This is a good place to update acl cache - instead
             # of wating for next request.
-            acl = self.getACL(self.request)
+            acl = self.getACL(self.request, inherit=False)
             if (not acl.may(self.request, self.request.user.name, "admin") and
                 parseACL(self.request, newtext) != acl and
                 action != "SAVE/REVERT"):


--- orig/MoinMoin/multiconfig.py
+++ mod/MoinMoin/multiconfig.py 
@@ -151,6 +151,7 @@
     FIXME: update according to MoinMoin:UpdateConfiguration
     """    
     acl_enabled = 0
+    acl_inherit_parent = 0
     # All acl_right lines must use unicode!
     acl_rights_default = u"Trusted:read,write,delete,revert Known:read,write,delete,revert All:read,write"
     acl_rights_before = u""

