diff --git a/lib/galaxy/config.py b/lib/galaxy/config.py index 6736daca589..4f882bba5d2 100644 --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -329,6 +329,7 @@ class Configuration( object ): self.biostar_url = kwargs.get( 'biostar_url', None ) self.biostar_key_name = kwargs.get( 'biostar_key_name', None ) self.biostar_key = kwargs.get( 'biostar_key', None ) + self.biostar_enable_bug_reports = string_as_bool( kwargs.get( 'biostar_enable_bug_reports', True ) ) self.pretty_datetime_format = expand_pretty_datetime_format( kwargs.get( 'pretty_datetime_format', '$locale (UTC)' ) ) self.master_api_key = kwargs.get( 'master_api_key', None ) if self.master_api_key == "changethis": # default in sample config file diff --git a/lib/galaxy/util/biostar.py b/lib/galaxy/util/biostar.py index d5fea0e6501..6552fd0fb2a 100644 --- a/lib/galaxy/util/biostar.py +++ b/lib/galaxy/util/biostar.py @@ -139,6 +139,7 @@ def biostar_logout( trans ): class BiostarErrorReporter( ErrorReporter ): def _send_report( self, user, email=None, message=None, **kwd ): assert biostar_enabled( self.app ), ValueError( "Biostar is not configured for this galaxy instance" ) + assert self.app.config.biostar_enable_bug_reports, ValueError( "Biostar is not configured to allow bug reporting for this galaxy instance" ) assert self._can_access_dataset( user ), Exception( "You are not allowed to access this dataset." ) tool_version_select_field, tools, tool = \ self.app.toolbox.get_tool_components( self.tool_id, tool_version=None, get_loaded_tools_by_lineage=False, set_selected=True ) diff --git a/templates/webapps/galaxy/dataset/errors.mako b/templates/webapps/galaxy/dataset/errors.mako index 87055b5a601..f815197bf1f 100644 --- a/templates/webapps/galaxy/dataset/errors.mako +++ b/templates/webapps/galaxy/dataset/errors.mako @@ -103,7 +103,7 @@
- %if trans.app.config.biostar_url: + %if trans.app.config.biostar_url and trans.app.config.biostar_enable_bug_reports: %endif