def checker(request, obj): identity = who.get_identity(request) if not identity or not identity.is_admin(): raise GuardError("Need admin permissions")
def checker(request, obj): if who.get_identity(request) is None: raise GuardError("Not logged in")