Skip to content

Commit

Permalink
Refine query condition to hide published and deleted items of other u…
Browse files Browse the repository at this point in the history
…sers
  • Loading branch information
guerler committed Dec 28, 2023
1 parent d7e6ca5 commit d7b8ab5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/managers/histories.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def p_tag_filter(term_text: str, quoted: bool):
)
)

if show_published and not is_admin:
if not show_own and show_published and not is_admin:
show_deleted = False

stmt = stmt.where(self.model_class.deleted == (true() if show_deleted else false()))
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/managers/visualizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def p_tag_filter(term_text: str, quoted: bool):
)
)

if show_published and not is_admin:
if not show_own and show_published and not is_admin:
show_deleted = False

query = query.filter(self.model_class.deleted == (true() if show_deleted else false()))
Expand Down

0 comments on commit d7b8ab5

Please sign in to comment.