Skip to content

Commit ef8440b

Browse files
removed the requirement to have a token to access this entpoint /entities/accessible-data-directories
1 parent 11585de commit ef8440b

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/app.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -588,22 +588,14 @@ class ReindexPriorityLevelEnum(Enum):
588588
def get_accessible_data_directories():
589589
dataset_helper = DatasetHelper()
590590

591-
# If not token is provided or an invalid token is provided, return a 401 error.
592-
if request.headers.get('Authorization') is None:
593-
unauthorized_error('A valid token must be provided.')
594-
595591
# If an invalid token provided, we need to tell the client with a 401 error, rather
596592
# than a 500 error later if the token is not good.
597593
_validate_token_if_auth_header_exists(request)
598594

599-
# Get user token from Authorization header
600-
# Get the user token from Authorization header
601-
user_token = auth_helper_instance.getAuthorizationTokens(request.headers)
602-
603595
# Get user group information which will be used to determine accessibility on
604596
# a per-entity basis.
605597
user_data_access_level = auth_helper_instance.getUserDataAccessLevel(request)
606-
598+
user_data_access_level['group_membership_ids'] = []
607599
if not request.is_json:
608600
bad_request_error("A json body and appropriate Content-Type header are required.")
609601
json_payload = request.get_json()

src/dataset_helper_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def verify_dataset_title_info(self, dataset_uuid: str, user_token: str) -> array
129129
# Returns a Dict of Dicts where each of the dicts inside is keyed by its original id given
130130
# in the json_payload and contains information about the accessibility of that directory
131131
# including its globus url.
132-
def get_entity_accessibility(self, neo4j_driver, json_payload, user_data_access_level: dict = None) -> dict:
132+
def get_entity_accessibility(self, neo4j_driver, json_payload, user_data_access_level) -> dict:
133133
supported_entity_type_list = ['Dataset', 'Upload']
134134
accessibility_dicts = {}
135135

0 commit comments

Comments
 (0)