Coverage for marvin.permissions : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" marvin.permissions ~~~~~~~~~~~~~~~~~~
Permissions used around marvin.
"""
def on_identity_loaded(sender, identity): # pylint: disable=unused-argument """ When an identify is loaded, initialize it with it's permissions. """
# Add the userneed
""" If you decorate a view with this, it will ensure that the current user is logged in and authenticated before calling the actual view.
:param func: The view function to decorate. :type func: function """
def decorated_view(*args, **kwargs): """ View that only grants access to authenticated users. """ else: 'msg': 'You must pass an auth_token to be able to access this endpoint', }, 401 |