changeset 5114:53d0b91736c4

add test for +/- ACL modifiers to make sure processing stops after a match of user AND requested right
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 30 Aug 2009 15:28:13 +0200
parents 95a4aa0eb1e9
children 675528f4c57a
files MoinMoin/security/_tests/test_security.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/security/_tests/test_security.py	Sat Aug 29 22:17:07 2009 +0200
+++ b/MoinMoin/security/_tests/test_security.py	Sun Aug 30 15:28:13 2009 +0200
@@ -197,6 +197,10 @@
         """ security: applying acl by user name"""
         # This acl string...
         acl_rights = [
+            "-MinusGuy:read "
+            "+MinusGuy:read "
+            "+PlusGuy:read "
+            "-PlusGuy:read "
             "Admin1,Admin2:read,write,delete,revert,admin  "
             "Admin3:read,write,admin  "
             "JoeDoe:read,write  "
@@ -226,6 +230,10 @@
             # All other users - every one not mentioned in the acl lines
             ('All', ('read', )),
             ('Anonymous', ('read', )),
+            # we check whether ACL processing stops for a user/right match
+            # with ACL modifiers
+            ('MinusGuy', ()),
+            ('PlusGuy', ('read', )),
             )
 
         # Check rights