Direct DbSession.owner == user becomes WHERE owner IS NULL when user is None (auth disabled), hiding all sessions that carry an explicit owner. Same flaw on the Document and GalleryImage sub-queries (active-doc and gallery badges). Replace all three with owner_filter(), which is a no-op when user is falsy. Fixes #3620
55 KiB
55 KiB