diff -urN moin-1.3.4/MoinMoin/multiconfig.py patch-moin-1.3.4/MoinMoin/multiconfig.py --- moin-1.3.4/MoinMoin/multiconfig.py 2005-03-12 16:26:14.000000000 -0500 +++ patch-moin-1.3.4/MoinMoin/multiconfig.py 2005-08-24 22:04:19.000000000 -0400 @@ -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"" diff -urN moin-1.3.4/MoinMoin/PageEditor.py patch-moin-1.3.4/MoinMoin/PageEditor.py --- moin-1.3.4/MoinMoin/PageEditor.py 2005-02-27 13:25:11.000000000 -0500 +++ patch-moin-1.3.4/MoinMoin/PageEditor.py 2005-08-24 22:06:57.000000000 -0400 @@ -914,7 +914,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 self.request.user.may.admin(self.page_name) and parseACL(self.request, newtext) != acl and action != "SAVE/REVERT"): diff -urN moin-1.3.4/MoinMoin/Page.py patch-moin-1.3.4/MoinMoin/Page.py --- moin-1.3.4/MoinMoin/Page.py 2005-02-15 04:06:16.000000000 -0500 +++ patch-moin-1.3.4/MoinMoin/Page.py 2005-08-24 22:04:19.000000000 -0400 @@ -1483,7 +1483,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 @@ -1492,6 +1492,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 """ @@ -1515,13 +1517,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')