From 38f7c6c3ec502d3fca798b2f9957552512a66699 Mon Sep 17 00:00:00 2001 From: Hicham Date: Wed, 16 Oct 2024 11:57:53 +0200 Subject: [PATCH] fix: check user right to export in xlsx --- admin_cohort/settings.py | 2 +- exports/services/rights_checker.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin_cohort/settings.py b/admin_cohort/settings.py index 8923b591..1757a51d 100644 --- a/admin_cohort/settings.py +++ b/admin_cohort/settings.py @@ -8,7 +8,7 @@ from celery.schedules import crontab TITLE = "Portail/Cohort360 API" -VERSION = "3.23.15" +VERSION = "3.23.16" AUTHOR = "Assistance Publique - Hopitaux de Paris, Département I&D" DESCRIPTION_MD = f"""Supports the official **Cohort360** web app and **Portail** Built by **{AUTHOR}** diff --git a/exports/services/rights_checker.py b/exports/services/rights_checker.py index 7c3fcb80..98ea640a 100644 --- a/exports/services/rights_checker.py +++ b/exports/services/rights_checker.py @@ -25,7 +25,7 @@ def check_owner_rights(self, owner: User, output_format: str, nominative: bool, data_permissions = accesses_service.get_data_reading_rights(user=owner, target_perimeters_ids=','.join(map(str, perimeters_ids))) self._check_rights(data_permissions=data_permissions, required_right=nominative and self.right_read_nomi or self.right_read_pseudo) - if output_format == "csv": + if output_format in ("csv", "xlsx"): required_right = nominative and self.right_csv_nomi or self.right_csv_pseudo else: required_right = nominative and self.right_jupyter_nomi or self.right_jupyter_pseudo