diff --git a/lib/galaxy/web/controllers/library_common.py b/lib/galaxy/web/controllers/library_common.py index fd500070ec8..1b23efec016 100644 --- a/lib/galaxy/web/controllers/library_common.py +++ b/lib/galaxy/web/controllers/library_common.py @@ -911,7 +911,7 @@ class LibraryCommon( BaseController ): dataset_names = [] created_ldda_ids = '' for hda_id in hda_ids: - hda = trans.sa_session.query( trans.app.model.HistoryDatasetAssociation ).get( trans.security.decode_id( hda_id ) ) + hda = trans.sa_session.query( trans.app.model.HistoryDatasetAssociation ).get( hda_id ) if hda: ldda = hda.to_library_dataset_dataset_association( target_folder=folder, replace_dataset=replace_dataset ) created_ldda_ids = '%s,%s' % ( created_ldda_ids, str( ldda.id ) ) diff --git a/lib/galaxy/web/controllers/requests.py b/lib/galaxy/web/controllers/requests.py index 2879ddf67f9..2efeda2bde4 100644 --- a/lib/galaxy/web/controllers/requests.py +++ b/lib/galaxy/web/controllers/requests.py @@ -608,7 +608,7 @@ class Requests( BaseController ): actions_to_check = [ trans.app.security_agent.permitted_actions.LIBRARY_ADD ] libraries = odict() for library in all_libraries: - can_show, hidden_folder_ids = trans.app.security_agent.show_library_item( user, roles, library, actions_to_check ) + can_show, hidden_folder_ids = trans.app.security_agent.show_library_item( trans.user, roles, library, actions_to_check ) if can_show: libraries[ library ] = hidden_folder_ids # create data library selectbox with refresh on change enabled @@ -661,7 +661,8 @@ class Requests( BaseController ): else: folder_list.add_option('Select one', 'none') # get all show-able folders for the selected library - showable_folders = trans.app.security_agent.get_showable_folders( user, roles, + showable_folders = trans.app.security_agent.get_showable_folders( trans.user, + roles, selected_lib, actions_to_check, selected_hidden_folder_ids ) diff --git a/templates/library/common/common.mako b/templates/library/common/common.mako index 19a69e1ac27..b165d4e9ec4 100644 --- a/templates/library/common/common.mako +++ b/templates/library/common/common.mako @@ -80,7 +80,7 @@ %if replace_dataset not in [ None, 'None' ]:
- You are currently selecting a new file to replace '${replace_dataset.name}'. + You are currently selecting a new file to replace '${replace_dataset.name}'.
%endif @@ -302,7 +302,7 @@ %if replace_dataset not in [ None, 'None' ]:
- You are currently selecting a new file to replace '${replace_dataset.name}'. + You are currently selecting a new file to replace '${replace_dataset.name}'.
%endif diff --git a/test/functional/test_toolbox.py b/test/functional/test_toolbox.py index 3f550a4ea1b..b66c0ee5300 100644 --- a/test/functional/test_toolbox.py +++ b/test/functional/test_toolbox.py @@ -60,10 +60,18 @@ class ToolTestCase( TwillTestCase ): page_inputs = self.__expand_grouping(testdef.tool.inputs_by_page[i], all_inputs) self.submit_form( **page_inputs ) print "page_inputs (%i)" % i, page_inputs - # Check the results ( handles single or multiple tool outputs ) + # Check the results ( handles single or multiple tool outputs ). Make sure to pass the correct hid. + # The output datasets from the tool should be in the same order as the testdef.outputs. + data_list = self.get_history_as_data_list() + self.assertTrue( data_list ) + elem_index = 0 - len( testdef.outputs ) for output_tuple in testdef.outputs: name, file, sort = output_tuple - self.verify_dataset_correctness( file, maxseconds=testdef.maxseconds, sort=sort ) + # Get the correct hid + elem = data_list[ elem_index ] + elem_hid = elem.get( 'hid' ) + elem_index += 1 + self.verify_dataset_correctness( file, hid=elem_hid, maxseconds=testdef.maxseconds, sort=sort ) self.delete_history( id=self.security.encode_id( latest_history.id ) ) def __expand_grouping( self, tool_inputs, declared_inputs, prefix='' ):