@ -604,7 +621,7 @@ async function routes(app: FastifyInstance) {
schema:{
schema:{
summary:'Get a single page',
summary:'Get a single page',
description:
description:
"Addressed either by ID or by the hash of its path, which is how a page view asks for one. A hash only identifies a page within a locale, so `locale` picks between translations — the site's primary one when absent.\n\nReadable without a session, because a wiki is read by people who are not logged in — but an anonymous request only ever sees published pages, and never their source. Per-page access rules are not implemented yet.\n\nA password-protected page answers with its metadata and `isLocked: true`, its body withheld, until the session satisfies `POST …/unlock` — or unless the requester may edit the page, for whom the password is not a barrier.",
"Addressed either by ID or by the hash of its path, which is how a page view asks for one. A hash only identifies a page within a locale, so `locale` picks between translations — the site's primary one when absent.\n\nReadable without a session, because a wiki is read by people who are not logged in — but an anonymous request only ever sees published pages. `withContent` is answered against `read:source` on the page — or `write:pages`, since the editor loads the source to edit it — which a group's rules grant to whoever they name, guests included.\n\nA password-protected page answers with its metadata and `isLocked: true`, its body withheld, until the session satisfies `POST …/unlock` — or unless the requester may edit the page, for whom the password is not a barrier.",
tags:['Pages'],
tags:['Pages'],
params:{
params:{
type:'object',
type:'object',
@ -626,7 +643,8 @@ async function routes(app: FastifyInstance) {
withContent:{
withContent:{
type:'boolean',
type:'boolean',
default:false,
default:false,
description:'Include the source, which only an editor needs.'
description:
'Include the source. Withheld from a requester who may neither read the source nor write the page here.'
},
},
locale:{
locale:{
type:'string',
type:'string',
@ -646,8 +664,15 @@ async function routes(app: FastifyInstance) {