diff --git a/app/routers/dashboard.py b/app/routers/dashboard.py index 84b0166..e121db1 100644 --- a/app/routers/dashboard.py +++ b/app/routers/dashboard.py @@ -1024,7 +1024,8 @@ def _build_tree_children(conn, parent_id: int | None, ws_id: int) -> list: if parent_id is None: rows = conn.execute( "SELECT id, title, parent_section, content_format, content, " - "is_shared, created_at, updated_at FROM pages " + "(is_shared OR share_mode != 'private' OR COALESCE(published,0)) as is_shared, " + "created_at, updated_at FROM pages " "WHERE parent_id IS NULL AND workspace_id=? AND deleted_at IS NULL " "ORDER BY created_at DESC", (ws_id,), @@ -1032,7 +1033,8 @@ def _build_tree_children(conn, parent_id: int | None, ws_id: int) -> list: else: rows = conn.execute( "SELECT id, title, parent_section, content_format, content, " - "is_shared, created_at, updated_at FROM pages " + "(is_shared OR share_mode != 'private' OR COALESCE(published,0)) as is_shared, " + "created_at, updated_at FROM pages " "WHERE parent_id=? AND workspace_id=? AND deleted_at IS NULL " "ORDER BY created_at DESC", (parent_id, ws_id), diff --git a/app/templates/_page_editor_content.html b/app/templates/_page_editor_content.html index 1c57ccd..600d2d3 100644 --- a/app/templates/_page_editor_content.html +++ b/app/templates/_page_editor_content.html @@ -102,22 +102,24 @@
-