From 64f421a2522ad4fbb295b2f962957ac0c8973e22 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 23 Dec 2021 19:00:00 +0000 Subject: If phenotype metadata is cached, authenticate for those traits (otherwise authentication happens in create_trait at line 105) --- wqflask/wqflask/correlation/show_corr_results.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'wqflask') diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 4d2ac9ff..1c391386 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -29,6 +29,7 @@ from base.webqtlConfig import TMPDIR from wqflask.correlation.pre_computes import fetch_all_cached_metadata from wqflask.correlation.pre_computes import cache_new_traits_metadata +from utility.authentication_tools import check_resource_availability from utility import hmac @@ -106,6 +107,12 @@ def correlation_json_for_table(correlation_data, this_trait, this_dataset, targe get_qtl_info=True) target_trait = jsonable(target_trait_ob, target_dataset_ob) new_traits_metadata[trait_name] = target_trait + else: + if target_dataset['type'] == "Publish": + permissions = check_resource_availability(target_dataset_ob, trait_name) + if permissions['metadata'] == "no-access": + continue + if target_trait['view'] == False: continue results_dict = {} -- cgit v1.2.3