lib.auth.permissions.SignedIn.checkΒΆ

../_images/04.jpg

lib.auth.permissions.py:SignedIn.check()

In the example, the @authorize() decorator was supplied with an instance of the SignedIn permission class. The SignedIn.check() call simply returns the (True / False) value returned by a call on get_user().

The InGroup.check() function illustrates how group membership would be checked had an instance of that permission class been provided along with the name of a Group, e.g. @authorize(InGroup('admin')).

Previous topic

lib.decorators.authorize

Next topic

lib.auth.__init__.get_user

This Page