Пример #1
0
def experiment_public_access_badge(request, experiment_id):
    try:
        experiment = Experiment.objects.get(id=experiment_id)
    except Experiment.DoesNotExist:
        HttpResponse('')

    if authz.has_experiment_access(request, experiment_id):
        return HttpResponse(render_public_access_badge(experiment))
    return HttpResponse('')
Пример #2
0
def experiment_public_access_badge(request, experiment_id):
    try:
        experiment = Experiment.objects.get(id=experiment_id)
    except Experiment.DoesNotExist:
        HttpResponse('')

    if authz.has_experiment_access(request, experiment_id):
        return HttpResponse(render_public_access_badge(experiment))
    return HttpResponse('')
Пример #3
0
def experiment_public_access_badge(experiment):
    """
    Displays an badge the level of public access for this experiment
    """
    return render_public_access_badge(experiment)
Пример #4
0
def experiment_public_access_badge(experiment):
    """
    Displays an badge the level of public access for this experiment
    """
    return render_public_access_badge(experiment)