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('')
def experiment_public_access_badge(experiment): """ Displays an badge the level of public access for this experiment """ return render_public_access_badge(experiment)