diff --git a/lib/galaxy/managers/pages.py b/lib/galaxy/managers/pages.py index 101d785c688e..6a72d7edcd4d 100644 --- a/lib/galaxy/managers/pages.py +++ b/lib/galaxy/managers/pages.py @@ -18,6 +18,7 @@ import sqlalchemy from sqlalchemy import ( + and_, desc, false, func, @@ -158,6 +159,10 @@ def index_query( stmt = select(self.model_class) + # Do not include pages authored by deleted users + if show_published: + stmt = stmt.join(Page.user).where(and_(User.deleted == false(), User.purged == false())) + filters = [] if show_own or (not show_published and not show_shared and not is_admin): filters = [self.model_class.user == user]