Skip to content

Commit adc8d3f

Browse files
committed
Handle globus urls for new public versions of protected data
1 parent 6e35dac commit adc8d3f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/app.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2841,7 +2841,8 @@ def get_globus_url(id):
28412841

28422842
# The user is in the Globus group with full access to thie dataset,
28432843
# so they have protected level access to it
2844-
if ('hmgroupids' in user_info) and (group_uuid in user_info['hmgroupids']):
2844+
protected_group_uuid = auth_helper_instance.get_protected_data_group_uuid()
2845+
if 'hmgroupids' in user_info and (group_uuid in user_info['hmgroupids'] or (not protected_group_uuid is None and protected_group_uuid in user_info['hmgroupids'])):
28452846
user_data_access_level = ACCESS_LEVEL_PROTECTED
28462847
else:
28472848
if not 'data_access_level' in user_info:
@@ -2875,6 +2876,10 @@ def get_globus_url(id):
28752876
globus_server_uuid = app.config['GLOBUS_PROTECTED_ENDPOINT_UUID']
28762877
access_dir = access_level_prefix_dir(app.config['PROTECTED_DATA_SUBDIR'])
28772878
dir_path = dir_path + access_dir + group_name + "/"
2879+
elif (entity_data_access_level == ACCESS_LEVEL_PROTECTED) and (entity_dict['status'] == 'Published'):
2880+
globus_server_uuid = app.config['GLOBUS_PUBLIC_ENDPOINT_UUID']
2881+
access_dir = access_level_prefix_dir(app.config['PUBLIC_DATA_SUBDIR'])
2882+
dir_path = dir_path + access_dir + "/"
28782883

28792884
if globus_server_uuid is None:
28802885
forbidden_error("Access not granted")

0 commit comments

Comments
 (0)