We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4d18d25 + 1507aaa commit 6af84aaCopy full SHA for 6af84aa
htsget_server/drs_operations.py
@@ -75,6 +75,12 @@ def get_object_for_drs_uri(drs_uri):
75
76
77
def list_objects(program_id=None, submitter_sample_id=None):
78
+ if program_id is not None:
79
+ if not authz.is_program_authorized(connexion.request, program_id):
80
+ return {"message": f"Not authorized to list objects for program {program_id}"}, 403
81
+ else:
82
+ if not authz.has_full_authz(connexion.request):
83
+ return {"message": f"Not authorized to list all objects"}, 403
84
return database.list_drs_objects(program_id=program_id, submitter_sample_id=submitter_sample_id), 200
85
86
0 commit comments