1. Thomas Waldmann
  2. moin-1.9


Christopher Denter  committed 47c0ada

Add security tests for hierarchic acl processing. The tests fail.

  • Participants
  • Parent commits e9a2cbc
  • Branches default

Comments (0)

Files changed (1)

File MoinMoin/security/_tests/test_security.py

View file
     acls_after = u"All:read"
     mainpage_name = u'AclTestMainPage'
     subpage_name = u'AclTestMainPage/SubPage'
+    item_rwforall = u'EveryoneMayReadWriteMe'
+    subitem_4boss = u'EveryoneMayReadWriteMe/OnlyTheBossMayWMe'
     pages = [
         # pagename, content
         (mainpage_name, u"#acl JoeDoe: JaneDoe:read,write\nFoo!"),
         (subpage_name, u"FooFoo!"),
+        (item_rwforall, u"#acl All:read,write\nMay be read from and written to by anyone"),
+        (subitem_4boss, u"#acl JoeDoe:read,write\nOnly JoeDoe (the boss) may write"),
     def setup_class(self):
             (True,  self.subpage_name, u'JoeDoe', []), # by inherited acl from main page
             (False, self.subpage_name, u'JaneDoe', ['read', 'write']), # by default acl
             (True,  self.subpage_name, u'JaneDoe', ['read', 'write']), # by inherited acl from main page
+            (True,  self.subitem_4boss, u'AnyUser', ['read']), # by after acl
+            (True,  self.subitem_4boss, u'JoeDoe', ['read', 'write']), # by item acl
         for hierarchic, pagename, username, may in tests: