Skip to content

Commit

Permalink
Remoove scopes as argument
Browse files Browse the repository at this point in the history
  • Loading branch information
vale95-eng committed Jun 17, 2024
1 parent f75e01c commit aa10db5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ async def oai(request: Request, dataset_id: str):

# Add dataset_id to the parameters as "set_", which is a parameter from the OAI-PMH protocol
params['set'] = dataset_id
params['scopes'] = request.auth.scopes
# params['scopes'] = request.auth.scopes

# Making sure it uses the dcat_ap metadata prefix
if 'metadataPrefix' not in params:
Expand Down
4 changes: 2 additions & 2 deletions api/app/oai_dcat/metadata_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Each method in this class is a verb from the OAI-PMH protocol. Only listRecords is used by the data.europa harvester
class MyMetadataProvider:
# Method to list records, only method used by data.europa harvester
def listRecords(self, metadataPrefix='dcat_ap', from_=None, until=None, set=None, scopes=None):
def listRecords(self, metadataPrefix='dcat_ap', from_=None, until=None, set=None):
logging.debug("Fetching data from API")
# Fetch data from the dataset endpoint
# TODO: Refactor to fetch from all endpoints, or get data directly if this code is integrated in the data lake system
Expand All @@ -28,7 +28,7 @@ def listRecords(self, metadataPrefix='dcat_ap', from_=None, until=None, set=None
'''
try:
data = json.dumps(dataset_handler.get_product_details(
user_roles_names=scopes,
user_roles_names=['public'],
dataset_id=set,
))
except exc.BaseDDSException as err:
Expand Down

0 comments on commit aa10db5

Please sign in to comment.