mirror of
https://github.com/logseq/logseq.git
synced 2026-05-21 03:12:38 +00:00
fix(publish): hide protected pages from ref and user listings
This commit is contained in:
12
deps/publish/src/logseq/publish/meta_store.cljs
vendored
12
deps/publish/src/logseq/publish/meta_store.cljs
vendored
@@ -318,11 +318,12 @@
|
||||
"pages.short_id, "
|
||||
"MAX(page_refs.updated_at) AS updated_at "
|
||||
"FROM page_refs "
|
||||
"LEFT JOIN pages "
|
||||
"INNER JOIN pages "
|
||||
"ON pages.graph_uuid = page_refs.graph_uuid "
|
||||
"AND pages.page_uuid = page_refs.source_page_uuid "
|
||||
"WHERE (lower(page_refs.target_page_title) = lower(?)) "
|
||||
"OR (page_refs.target_page_name = lower(?)) "
|
||||
"WHERE ((lower(page_refs.target_page_title) = lower(?)) "
|
||||
"OR (page_refs.target_page_name = lower(?))) "
|
||||
"AND pages.password_hash IS NULL "
|
||||
"GROUP BY page_refs.graph_uuid, page_refs.source_page_uuid, page_refs.source_page_title, pages.short_id "
|
||||
"ORDER BY updated_at DESC;")
|
||||
ref-name
|
||||
@@ -347,7 +348,10 @@
|
||||
rows (publish-common/get-sql-rows
|
||||
(publish-common/sql-exec sql
|
||||
(str "SELECT page_uuid, page_title, short_id, graph_uuid, updated_at, owner_username "
|
||||
"FROM pages WHERE owner_username = ? ORDER BY updated_at DESC;")
|
||||
"FROM pages "
|
||||
"WHERE owner_username = ? "
|
||||
"AND password_hash IS NULL "
|
||||
"ORDER BY updated_at DESC;")
|
||||
username))]
|
||||
(publish-common/json-response {:user {:username username}
|
||||
:pages (map (fn [row]
|
||||
|
||||
Reference in New Issue
Block a user