"""Permission denied to the resource
"""Represent the user's identity.
return IdentityContext(self, http_exception)
+ def test(self, http_exception=None):
+ Checks if permission available and raises relevant exception
+ if not. This is useful if you just want to check permission
+ without wrapping everything in a require() block.
+ This is equivalent to::
+ with permission.require():
+ with self.require(http_exception):
Returns negative of current state (needs->denies, denies->needs)