Public shares: any valid Immich link opens through the proxy and is recorded in /admin, with a per-share sign-in-only switch; comments stay recipient-only

This commit is contained in:
zyphlar
2026-11-07 22:34:44 -08:00
parent d4ce4444b8
commit 17bf59b218
9 changed files with 368 additions and 42 deletions
+3 -2
View File
@@ -45,9 +45,10 @@ export async function gallery (res: Response, share: SharedLink, openItem?: numb
const motionPhotos = !!getConfigOption('ipp.motionPhotos', true)
const descriptionInCaption = shareMetadataAllowed && !!getConfigOption('ipp.showMetadata.description.caption', false)
const descriptionInSidebar = shareMetadataAllowed && !!getConfigOption('ipp.showMetadata.description.sidebar', false)
// A signed-in recipient can comment, which lives in the sidebar too
// A recipient given this share can comment, which lives in the sidebar too.
// Anyone else viewing a public share (signed in or not) never sees comments.
const viewer = res.req.recipient
const comments = viewer
const comments = viewer && res.req.grantedShare?.key === share.key
? { base: '/share/comments/' + share.key, counts: getStore().countComments(share.key) }
: undefined
const sidebarHasContent = !!comments ||