Commits

"danjac"  committed 4503149

first try at negative permissions

  • Participants
  • Parent commits b15c4f1

Comments (0)

Files changed (2)

File flaskext/principal.py

     Shortcut class for passing denied needs.
     """
 
-    def __init__(*deny):
+    def __init__(self, *deny):
         self.deny = set(deny)
         self.needs = set()
 

File tests/test_principal.py

 
 def test_permission_union_denial():
     p1 = Permission(('a', 'b'))
-    p2 = Permission(('a', 'c'))
+    p2 = Denial(('a', 'c'))
     p3 = p1.union(p2)
     assert p1.issubset(p3)
     assert p2.issubset(p3)