Пример #1
0
def add_dataset_par(request, dataset_id):
    parentObject = Dataset.objects.get(id=dataset_id)
    if authz.has_write_permissions(request, parentObject.experiment.id):
        return add_par_alt(request, parentObject, otype="dataset",
                stype=Schema.DATASET)
    else:
        return return_response_error(request)
Пример #2
0
def add_experiment_par(request, experiment_id):
    parentObject = Experiment.objects.get(id=experiment_id)
    if authz.has_write_permissions(request, parentObject.id):
        return add_par_alt(request, parentObject, otype="experiment",
                stype=Schema.EXPERIMENT)
    else:
        return return_response_error(request)
Пример #3
0
def edit_datafile_par(request, parameterset_id):
    parameterset = DatafileParameterSet.objects.get(id=parameterset_id)
    if authz.has_write_permissions(request,
                                   parameterset.dataset_file.dataset.experiment.id):
        return edit_parameters_alt(request, parameterset, otype="datafile")
    else:
        return return_response_error(request)
Пример #4
0
def edit_datafile_par(request, parameterset_id):
    parameterset = DatafileParameterSet.objects.get(id=parameterset_id)
    if authz.has_write_permissions(
            request, parameterset.dataset_file.dataset.experiment.id):
        return edit_parameters_alt(request, parameterset, otype="datafile")
    else:
        return return_response_error(request)
Пример #5
0
def add_experiment_par(request, experiment_id):
    parentObject = Experiment.objects.get(id=experiment_id)
    if authz.has_write_permissions(request, parentObject.id):
        return add_par_alt(request,
                           parentObject,
                           otype="experiment",
                           stype=Schema.EXPERIMENT)
    else:
        return return_response_error(request)
Пример #6
0
def add_dataset_par(request, dataset_id):
    parentObject = Dataset.objects.get(id=dataset_id)
    if authz.has_write_permissions(request, parentObject.experiment.id):
        return add_par_alt(request,
                           parentObject,
                           otype="dataset",
                           stype=Schema.DATASET)
    else:
        return return_response_error(request)
Пример #7
0
def edit_experiment_par(request, parameterset_id):
    parameterset = ExperimentParameterSet.objects.get(id=parameterset_id)
    if authz.has_write_permissions(request, parameterset.experiment.id):
        return edit_parameters_alt(request, parameterset, otype="experiment")
    else:
        return return_response_error(request)
Пример #8
0
def edit_experiment_par(request, parameterset_id):
    parameterset = ExperimentParameterSet.objects.get(id=parameterset_id)
    if authz.has_write_permissions(request, parameterset.experiment.id):
        return edit_parameters_alt(request, parameterset, otype="experiment")
    else:
        return return_response_error(request)