Skip to content

Commit

Permalink
Merge pull request #19136 from guerler/fix_saved_viz
Browse files Browse the repository at this point in the history
Restore access to saved visualizations
  • Loading branch information
mvdbeek authored Nov 15, 2024
2 parents ef6d1bb + 7780c62 commit 5ab07ff
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/galaxy/webapps/galaxy/controllers/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ class VisualizationController(
def __init__(self, app: StructuredApp):
super().__init__(app)

def get_visualization(self, trans, visualization_id, check_ownership=True, check_accessible=False):
"""
Get a Visualization from the database by id, verifying ownership.
"""
visualization = trans.sa_session.get(model.Visualization, trans.security.decode_id(visualization_id))
if not visualization:
raise MessageException("Visualization not found")
else:
return self.security_check(trans, visualization, check_ownership, check_accessible)

#
# -- Functions for operating on visualizations. --
#
Expand Down

0 comments on commit 5ab07ff

Please sign in to comment.