From 3a2bc2cf251e649703b1eda843b77aa99bd2bf5f Mon Sep 17 00:00:00 2001 From: John Davis Date: Tue, 6 Aug 2024 14:36:57 -0400 Subject: [PATCH 1/3] Strip whitespace when listifying admin users --- lib/galaxy/config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/config/__init__.py b/lib/galaxy/config/__init__.py index ca78874969eb..9b2d435ae393 100644 --- a/lib/galaxy/config/__init__.py +++ b/lib/galaxy/config/__init__.py @@ -594,7 +594,7 @@ def admin_users(self): @admin_users.setter def admin_users(self, value): self._admin_users = value - self.admin_users_list = listify(value) + self.admin_users_list = listify(value, do_strip=True) def is_admin_user(self, user: Optional["User"]) -> bool: """Determine if the provided user is listed in `admin_users`.""" From 99b3d29e69c905996c6c26296a89650b7ee1755b Mon Sep 17 00:00:00 2001 From: Dannon Date: Fri, 20 Sep 2024 07:13:11 +0200 Subject: [PATCH 2/3] Change mechanism for loading data into editor viz avoiding injecting it as innerHTML and executing contents. --- config/plugins/visualizations/editor/templates/editor.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/plugins/visualizations/editor/templates/editor.mako b/config/plugins/visualizations/editor/templates/editor.mako index 385edbba6205..1046842c3417 100755 --- a/config/plugins/visualizations/editor/templates/editor.mako +++ b/config/plugins/visualizations/editor/templates/editor.mako @@ -62,11 +62,11 @@ const ajax_url = "${h.url_for( controller='/datasets', action='index')}/" + hda_id + "/display"; const data = httpGet(ajax_url); - document.getElementById("editor").innerHTML = data; var editor = ace.edit("editor", { mode: "ace/mode/powershell", theme: "ace/theme/textmate" }); + editor.setValue(data, -1); From 9a9c4a8eb85211d627d5dbe3573656eb9c22e2e3 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 29 Jul 2024 10:28:44 -0400 Subject: [PATCH 3/3] Do not set uuid on dataset imports. --- lib/galaxy/model/store/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/model/store/__init__.py b/lib/galaxy/model/store/__init__.py index c2a616c50419..063bbc295dd1 100644 --- a/lib/galaxy/model/store/__init__.py +++ b/lib/galaxy/model/store/__init__.py @@ -289,10 +289,11 @@ def remap_objects(p, k, obj): self._attach_raw_id_if_editing(dataset_instance, dataset_attrs) # Older style... - if 'uuid' in dataset_attrs: - dataset_instance.dataset.uuid = dataset_attrs["uuid"] - if 'dataset_uuid' in dataset_attrs: - dataset_instance.dataset.uuid = dataset_attrs["dataset_uuid"] + if self.import_options.allow_edit: + if 'uuid' in dataset_attrs: + dataset_instance.dataset.uuid = dataset_attrs["uuid"] + if 'dataset_uuid' in dataset_attrs: + dataset_instance.dataset.uuid = dataset_attrs["dataset_uuid"] self._session_add(dataset_instance) self._flush()