@ajax_request
@login_required
def is_authorized(request):
    actions, org, error, message = _parse_is_authenticated_params(request)
    if error:
        return {'status': 'error', 'message': message}

    auth = _try_parent_org_auth(request.user, org, actions)
    if auth:
        return {'status': 'success', 'auth': auth}

    try:
        ou = OrganizationUser.objects.get(
            user=request.user, organization=org
        )
    except OrganizationUser.DoesNotExist:
        return {'status': 'error', 'message': 'user does not exist'}

    auth = {action: PERMS[action](ou) for action in actions}
    return {'status': 'success', 'auth': auth}
Verify default content type.
dataset/ETHPy150Open buildingenergy/buildingenergy-platform/seed/views/accounts.py/is_authorized--crossover with--dataset/ETHPy150Open viewfinderco/viewfinder/backend/www/test/new_client_log_url_test.py/NewClientLogUrlTestCase.testDefaultContentType