changeset 4339:897cdbe9e8f2

Provide fix for recently added failing security tests.
author Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com>
date Tue, 09 Jun 2009 00:45:52 +0200
parents 47c0ada5c1a2
children 36d4b0af2213 a8c445a6d37e
files MoinMoin/security/__init__.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/security/__init__.py	Tue Jun 09 00:44:00 2009 +0200
+++ b/MoinMoin/security/__init__.py	Tue Jun 09 00:45:52 2009 +0200
@@ -69,6 +69,10 @@
                 allowed = acl.may(request, username, right)
                 if allowed is not None:
                     return allowed
+                # If the item has an acl (even one that doesn't match) we *do not*
+                # check the parents. We only check the parents if there's no acl on
+                # the item at all.
+                break
         if not some_acl:
             allowed = cache.acl_rights_default.may(request, username, right)
             if allowed is not None: