From f6ac13568f62731fb785e3aafafbf3aacf21a7a2 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 2 Feb 2018 00:06:53 -0500 Subject: [PATCH 1/3] Don't fail rest of multi-action queue when attempting to purge a collection. Fixes https://github.com/galaxyproject/galaxy/issues/5117. --- client/galaxy/scripts/mvc/history/history-view-edit.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/galaxy/scripts/mvc/history/history-view-edit.js b/client/galaxy/scripts/mvc/history/history-view-edit.js index 47ab7d82e3c..29df8a91b92 100644 --- a/client/galaxy/scripts/mvc/history/history-view-edit.js +++ b/client/galaxy/scripts/mvc/history/history-view-edit.js @@ -275,7 +275,12 @@ var HistoryViewEdit = _super.extend( func: function() { if (confirm(_l("This will permanently remove the data in your datasets. Are you sure?"))) { var action = HDA_MODEL.HistoryDatasetAssociation.prototype.purge; - panel.getSelectedModels().ajaxQueue(action); + const historyContents = panel.getSelectedModels(); + const selectedDatasets = historyContents.filter( + c => + c.get("history_content_type") == "dataset" + ) + historyContents.ajaxQueue(action, {}, selectedDatasets); } } }); From 5e6a2572f8bfabd6c674ff218d8a3ee1f9f22615 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Mon, 19 Feb 2018 11:15:03 +0000 Subject: [PATCH 2/3] Allow LDAP options not starting with OPT_ Fix https://github.com/galaxyproject/galaxy/issues/5486 --- lib/galaxy/auth/providers/ldap_ad.py | 35 +++++++++++++--------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/lib/galaxy/auth/providers/ldap_ad.py b/lib/galaxy/auth/providers/ldap_ad.py index 2476f0b046d..0fddc3a0875 100644 --- a/lib/galaxy/auth/providers/ldap_ad.py +++ b/lib/galaxy/auth/providers/ldap_ad.py @@ -25,7 +25,7 @@ def _get_subs(d, k, params): return str(d[k]).format(**params) -def _parse_ldap_options(ldap, options_unparsed): +def _parse_ldap_options(options_unparsed): # Tag is defined in the XML but is empty if not options_unparsed: return [] @@ -42,26 +42,23 @@ def _parse_ldap_options(ldap, options_unparsed): log.warning("LDAP authenticate: Invalid syntax '%s' inside element. Syntax should be option1=value1,option2=value2" % opt) continue + if not key.startswith(prefix): + log.warning("LDAP authenticate: Invalid LDAP option '%s'. '%s' doesn't start with prefix '%s'", opt, key, prefix) + continue try: - pair = [] - for n in (key, value): - if not n.startswith(prefix): - raise ValueError - - name = getattr(ldap, n) - pair.append(name) - - except ValueError: - log.warning("LDAP authenticate: Invalid parameter pair %s=%s. '%s' doesn't start with prefix %s", key, value, n, prefix) - continue - + key = getattr(ldap, key) except AttributeError: - log.warning("LDAP authenticate: Invalid parameter pair %s=%s. '%s' is not available in module ldap", key, value, n) + log.warning("LDAP authenticate: Invalid LDAP option '%s'. '%s' is not available in module ldap", opt, key) continue - - else: - log.debug("LDAP authenticate: Valid LDAP option pair %s=%s -> %s=%s", key, value, *pair) - ldap_options.append(pair) + if value.startswith(prefix): + try: + value = getattr(ldap, value) + except AttributeError: + log.warning("LDAP authenticate: Invalid LDAP option '%s'. '%s' is not available in module ldap", opt, value) + continue + pair = (key, value) + log.debug("LDAP authenticate: Valid LDAP option pair '%s' -> '%s=%s'", opt, *pair) + ldap_options.append(pair) return ldap_options @@ -128,7 +125,7 @@ class LDAP(AuthProvider): except ConfigurationError: ldap_options = () else: - ldap_options = _parse_ldap_options(ldap, ldap_options_raw) + ldap_options = _parse_ldap_options(ldap_options_raw) try: # setup connection From d964d594a5314b85def7676f5ae39c949420f4f0 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 19 Feb 2018 08:57:51 -0500 Subject: [PATCH 3/3] [18.01] Do not reload page when deleting collections. Fixes #5499 reported by @mvdbeek (thanks for catching that). --- client/galaxy/scripts/mvc/history/hdca-li-edit.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/galaxy/scripts/mvc/history/hdca-li-edit.js b/client/galaxy/scripts/mvc/history/hdca-li-edit.js index 5e75398b5d1..6d429ae9245 100644 --- a/client/galaxy/scripts/mvc/history/hdca-li-edit.js +++ b/client/galaxy/scripts/mvc/history/hdca-li-edit.js @@ -40,17 +40,17 @@ var HDCAListItemEdit = _super.extend(