From 3d39e0fad0418edecf0169beff778236bf7e4a84 Mon Sep 17 00:00:00 2001 From: Helena Rasche Date: Mon, 14 May 2018 11:50:54 +0200 Subject: [PATCH] read policy options --- lib/galaxy/webapps/reports/config.py | 8 ++++++++ lib/galaxy/webapps/tool_shed/config.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/galaxy/webapps/reports/config.py b/lib/galaxy/webapps/reports/config.py index 79f1757fc72..caabf412de4 100644 --- a/lib/galaxy/webapps/reports/config.py +++ b/lib/galaxy/webapps/reports/config.py @@ -52,6 +52,14 @@ class Configuration(object): # Error logging with sentry self.sentry_dsn = kwargs.get('sentry_dsn', None) + # Security/Policy Compliance + self.redact_username_in_logs = False + self.redact_email_in_job_name = False + self.gdpr_compliance_mode = string_as_bool(kwargs.get("gdpr_compliance_mode", False)) + if self.gdpr_compliance_mode: + self.redact_username_in_logs = True + self.redact_email_in_job_name = True + def get(self, key, default): return self.config_dict.get(key, default) diff --git a/lib/galaxy/webapps/tool_shed/config.py b/lib/galaxy/webapps/tool_shed/config.py index 8069a21a3e6..ecffd4e1098 100644 --- a/lib/galaxy/webapps/tool_shed/config.py +++ b/lib/galaxy/webapps/tool_shed/config.py @@ -142,6 +142,14 @@ class Configuration(object): self.citation_cache_lock_dir = resolve_path(kwargs.get("citation_cache_lock_dir", "database/tool_shed_citations/locks"), self.root) self.password_expiration_period = timedelta(days=int(kwargs.get("password_expiration_period", 0))) + # Security/Policy Compliance + self.redact_username_in_logs = False + self.redact_email_in_job_name = False + self.gdpr_compliance_mode = string_as_bool(kwargs.get("gdpr_compliance_mode", False)) + if self.gdpr_compliance_mode: + self.redact_username_in_logs = True + self.redact_email_in_job_name = True + @property def shed_tool_data_path(self): return self.tool_data_path