Changeset 072a242 in Klonkt for src/routes/posts.js
- Timestamp:
- 07/21/2026 03:26:24 AM (7 weeks ago)
- Branches:
- main
- Children:
- b9beb16
- Parents:
- dede82e
- git-author:
- Robin <roboburr@…> (07/21/2026 03:26:22 AM)
- git-committer:
- Robin <roboburr@…> (07/21/2026 03:26:24 AM)
- File:
-
- 1 edited
-
src/routes/posts.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
rdede82e r072a242 22 22 import { premiumUnlocked } from '../services/PatreonService.js'; 23 23 import { defaultMinCents as paidDefaultMinCents, patreonUrl as paidPatronUrl } from '../services/PaidPatreonService.js'; 24 import { verifyBlob } from '../services/CryptoBox.js'; 24 25 import MusicMeta from '../services/MusicMeta.js'; 25 26 … … 1238 1239 // never see the unlock button). 1239 1240 const canEditThis = req.session?.user && PermissionsService.canEditPost(req.session.user, post, site); 1240 if (post.paid && !canEditThis) { 1241 // A fresh unlock capability (?u=) from /paid/unlock lets a just-verified 1242 // supporter render the FULL post through this normal template (correct layout, 1243 // scoped styles, working audio). Short-lived signed blob, single post, not a 1244 // cookie and not stored. 1245 const _u = req.query.u ? verifyBlob(String(req.query.u)) : null; 1246 const _unlocked = _u && _u.purpose === 'unlocked' && _u.siteId === site.id && String(_u.post) === String(post.slug); 1247 if (post.paid && !canEditThis && !_unlocked) { 1241 1248 const { newerPost, olderPost } = postNeighbors(site, post, res.locals.tenancy === 'hub'); 1242 1249 return renderPage(req, res, 'pages/paid-gate', {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)