Skip to content

Commit

Permalink
Merge branch 'release_23.1' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Jun 26, 2023
2 parents a7d4e3e + b4b7f2a commit 8795b97
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions client/src/components/Libraries/LibrariesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<font-awesome-icon icon="home" />
</b-button>
<b-button
v-if="currentUser.is_admin"
v-if="currentUser && currentUser.is_admin"
id="create-new-lib"
v-b-toggle.collapse-2
title="Create new folder"
Expand All @@ -15,7 +15,7 @@
</b-button>
<SearchField :typing-delay="0" @updateSearch="searchValue($event)" />
<b-form-checkbox
v-if="currentUser.is_admin"
v-if="currentUser && currentUser.is_admin"
v-localize
class="mr-1"
@input="toggle_include_deleted($event)">
Expand Down Expand Up @@ -50,6 +50,7 @@
hover
:fields="fields"
:items="librariesList"
:sort-by.sync="sortBy"
:per-page="perPage"
:current-page="currentPage"
show-empty
Expand Down Expand Up @@ -124,7 +125,7 @@
</div>
</b-button>
<b-button
v-if="currentUser.is_admin && !row.item.deleted"
v-if="currentUser && currentUser.is_admin && !row.item.deleted"
size="sm"
class="lib-btn permission_library_btn"
:title="'Permissions of ' + row.item.name"
Expand All @@ -133,7 +134,7 @@
Manage
</b-button>
<b-button
v-if="currentUser.is_admin && row.item.editMode && !row.item.deleted"
v-if="currentUser && currentUser.is_admin && row.item.editMode && !row.item.deleted"
size="sm"
class="lib-btn delete-lib-btn"
:title="`Delete ${row.item.name}`"
Expand Down Expand Up @@ -237,6 +238,7 @@ export default {
titleDelete: _l("Delete"),
titlePerPage: _l("per page"),
titleTotal: _l("total"),
sortBy: "name",
};
},
computed: {
Expand Down
3 changes: 3 additions & 0 deletions lib/galaxy/managers/libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

from sqlalchemy import (
and_,
asc,
false,
func,
not_,
or_,
true,
Expand Down Expand Up @@ -208,6 +210,7 @@ def list(self, trans, deleted: Optional[bool] = False) -> Tuple[Query, Dict[str,
prefetched_ids["allowed_library_add_ids"] = allowed_library_add_ids
prefetched_ids["allowed_library_modify_ids"] = allowed_library_modify_ids
prefetched_ids["allowed_library_manage_ids"] = allowed_library_manage_ids
query = query.order_by(asc(func.lower(Library.name)))
return query, prefetched_ids

def secure(self, trans, library: Library, check_accessible: bool = True) -> Library:
Expand Down
Empty file.
5 changes: 2 additions & 3 deletions lib/galaxy_test/selenium/test_library_landing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class TestLibraryLanding(SeleniumTestCase):
requires_admin = True
run_as_admin = True

def setup_with_driver(self):
super().setup_with_driver()
Expand Down Expand Up @@ -72,8 +72,7 @@ def test_sorting(self):

self._assert_num_displayed_libraries_is(3)
self.screenshot("libraries_index_search")
# sort ascending
self.libraries_index_sort_click()
# ascending sort is default
self._assert_names_are([f"{namebase} a", f"{namebase} b", f"{namebase} c"])
# sort descending
self.libraries_index_sort_click()
Expand Down

0 comments on commit 8795b97

Please sign in to comment.