:param needs: The needs for this permission
def __init__(self, *needs):
- self.needs = set(needs)
"""A set of needs, any of which must be present in an identity to have
+ self.needs = set(needs)
+ """Equivalent to ``self.can()``.
def __and__(self, other):
+ """Does the same thing as ``self.union(other)``
def __contains__(self, other):
+ """Does the same thing as ``other.issubset(self)``.
def require(self, http_exception=None):
negative of current state (needs->excludes, excludes->needs)
+ Returns e of current state (needs->excludes, excludes->needs)
p = Permission(('a', 'b'))
assert ('a', 'b') in d.excludes