feature/keywords-analysis #272
@@ -144,12 +144,13 @@ async def get_dfg_projects(
|
||||
sort_direction,
|
||||
fuzzy,
|
||||
)
|
||||
is_allowed = await can_fetch_gdpr_relevant_data(access_token = access_token_metadata, raw_oa_author_id = author_id, raw_oa_institution_id = raw_oa_institution_id)
|
||||
if not is_allowed:
|
||||
raise HttpException(
|
||||
status_code=403,
|
||||
detail="Access denied for the provided author ID or institution ID",
|
||||
)
|
||||
if (author_id or raw_oa_institution_id):
|
||||
is_allowed = await can_fetch_gdpr_relevant_data(access_token = access_token_metadata, raw_oa_author_id = author_id, raw_oa_institution_id = raw_oa_institution_id)
|
||||
if not is_allowed:
|
||||
raise HttpException(
|
||||
status_code=403,
|
||||
detail="Access denied for the provided author ID or institution ID",
|
||||
)
|
||||
return await projects_service.get_dfg_projects(
|
||||
institutions_search_client=institutions_search_client,
|
||||
raw_oa_institution_id=raw_oa_institution_id,
|
||||
@@ -264,12 +265,13 @@ async def search_bund_projects(
|
||||
Query(description="Use OpenAlex topic-id resolution if true, otherwise raw keyword search."),
|
||||
] = False,
|
||||
) -> BundProjectPage:
|
||||
is_allowed = await can_fetch_gdpr_relevant_data(access_token = access_token_metadata, raw_oa_author_id = None, raw_oa_institution_id = raw_oa_institution_id)
|
||||
if not is_allowed:
|
||||
raise HttpException(
|
||||
status_code=403,
|
||||
detail="Access denied for the provided author ID or institution ID",
|
||||
)
|
||||
if (raw_oa_institution_id):
|
||||
is_allowed = await can_fetch_gdpr_relevant_data(access_token = access_token_metadata, raw_oa_author_id = None, raw_oa_institution_id = raw_oa_institution_id)
|
||||
if not is_allowed:
|
||||
raise HttpException(
|
||||
status_code=403,
|
||||
detail="Access denied for the provided author ID or institution ID",
|
||||
)
|
||||
return await projects_service.search_bund_projects_with_filters(
|
||||
institutions_search_client=institutions_search_client,
|
||||
executing_agency=executing_agency,
|
||||
@@ -448,12 +450,13 @@ async def search_eu_cordis_projects_endpoint(
|
||||
sort_direction,
|
||||
fuzzy,
|
||||
)
|
||||
is_allowed = await can_fetch_gdpr_relevant_data(access_token = access_token_metadata, raw_oa_author_id = author_id, raw_oa_institution_id = raw_oa_institution_id)
|
||||
if not is_allowed:
|
||||
raise HttpException(
|
||||
status_code=403,
|
||||
detail="Access denied for the provided author ID or institution ID",
|
||||
)
|
||||
if (author_id or raw_oa_institution_id):
|
||||
is_allowed = await can_fetch_gdpr_relevant_data(access_token = access_token_metadata, raw_oa_author_id = author_id, raw_oa_institution_id = raw_oa_institution_id)
|
||||
if not is_allowed:
|
||||
raise HttpException(
|
||||
status_code=403,
|
||||
detail="Access denied for the provided author ID or institution ID",
|
||||
)
|
||||
return await search_eu_cordis_projects(
|
||||
institutions_search_client=institutions_search_client,
|
||||
raw_oa_institution_id=raw_oa_institution_id,
|
||||
|
||||
Reference in New Issue
Block a user