Skip to content
Permalink
Browse files
AIRAVATA-3485 Use experiment owner user storage directory for listdir…
…, get_file_metadata
  • Loading branch information
machristie committed Jul 29, 2021
1 parent 5087097 commit bd420b84b5d2dc0ddd13feb1d4486aee4855f78e
Showing 1 changed file with 5 additions and 4 deletions.
@@ -396,8 +396,8 @@ def get_file_metadata(request, path, storage_resource_id=None, experiment_id=Non
file['data-product-uri'] = file['dataProductURI']
return file

backend = get_user_storage_provider(request, storage_resource_id=storage_resource_id)
final_path = _get_final_path(request, path, experiment_id)
final_path, owner_username = _get_final_path_and_owner_username(request, path, experiment_id)
backend = get_user_storage_provider(request, storage_resource_id=storage_resource_id, owner_username=owner_username)
if backend.is_file(final_path):
_, files = backend.get_metadata(final_path)
file = files[0]
@@ -517,8 +517,9 @@ def listdir(request, path, storage_resource_id=None, experiment_id=None):
file['data-product-uri'] = file['dataProductURI']
return data['directories'], data['files']

backend = get_user_storage_provider(request, storage_resource_id=storage_resource_id)
final_path = _get_final_path(request, path, experiment_id)
final_path, owner_username = _get_final_path_and_owner_username(request, path, experiment_id)
backend = get_user_storage_provider(request, storage_resource_id=storage_resource_id,
owner_username=owner_username)
directories, files = backend.get_metadata(final_path)
# Mark the TMP_INPUT_FILE_UPLOAD_DIR directory as hidden in the UI
for directory in directories:

0 comments on commit bd420b8

Please sign in to comment.