The Harborview Ledger

Independent news for the harbor and the islands · Most of it free, the deepest reporting for members

Test lab

This sandbox runs the RedeemID plugin against a real Shopify store. The Harborview Ledger is a faux news site with free and paywalled stories; the pages below test one piece of the plugin each. Start with the two panels (Sandbox health shows to administrators only), then work down the list.

Sandbox health

Visible to administrators only.

Test accounts

The theme seeds these WordPress users. As an administrator, open Test accounts in the toolbar (it needs the User Switching plugin), pick one, browse the Ledger, then use Switch back. Their state is put back each time you switch to them, and RedeemID → Test lab in the admin can point any of them at a real customer in the dev store.

AccountStateFreeMembersSilverGoldGold + Silver
Guest (signed out)—OpenTeaserTeaserTeaserTeaser
Riley Reader (ledger-reader)WordPress only, not linkedOpenOpenTeaserTeaserTeaser
Milo Member (ledger-member)Linked, no tagsOpenOpenTeaserTeaserTeaser
Sasha Silver (ledger-silver)silver-memberOpenOpenOpenTeaserTeaser
Gia Gold (ledger-gold)gold-memberOpenOpenTeaserOpenTeaser
Paz Premium (ledger-premium)gold-member + silver-memberOpenOpenOpenOpenOpen
Lou Lapsed (ledger-lapsed)gold-member, account disabledOpenOpenTeaserTeaserTeaser
Stella Stale (ledger-stale)gold-member, synced 30 days agoOpenOpenTeaserOpenTeaser
Ada Add-on (ledger-addon)silver-member + ad-free-addonOpenOpenOpenTeaserTeaser
What each story badge should show for each account. Members stories need only a signed-in WordPress user. Stella matches Gia: synced tags never expire, so an old sync still opens Gold.

Features

Features are site behaviours a membership unlocks, from the plugin’s feature registry. The theme registers two and only places the plugin’s blocks. Ad-free reading goes to Gold, or to anyone with the ad-free-addon tag, which stacks with any tier. It is mapped on RedeemID → Access → Features, and it hides the sponsor slot on stories and the home page. Early briefing goes to Silver or Gold, is set in code (so that screen shows it as managed in code), and shows tomorrow’s briefing on Briefings. Both appear as chips in the header and on the Account page.

AccountAd-free readingEarly briefing
GuestNo: sponsor slotNo: prompt
Riley ReaderNoNo
Milo MemberNoNo
Sasha SilverNoYes, from Silver
Gia GoldYes, from GoldYes, from Gold
Paz PremiumYes, from GoldYes, from Silver and Gold
Ada Add-onYes, from Ad-free add-onYes, from Silver
Lou LapsedNo (disabled)No (disabled)
Stella StaleYes, from GoldYes, from Gold
The plugin decides each feature on the server, so a withheld block is not in the page source at all. The early briefing carries the marker LEDGER-FEATURE-EARLY-BRIEFING, which must appear only for Silver and Gold. Ad-free holders also get the redeemid-feature-ad-free body class (the masthead says “Ad-free”) and window.redeemidFeatures, which is presentation only.

Content types and their rules

The plugin gates more than posts. The theme registers four demo post types and four taxonomies (Editions, Series, Neighborhoods and a Topics taxonomy shared by posts and every type) and seeds rules on each layer: RedeemID → Access → Content rules for the post types, each term’s edit screen for term rules, and the Access box on each item. The table shows which layer should decide each item and the badge a guest should see.

ItemTypeDecided byGuest badge
Monday briefing: the bridge vote, a ferry warning and a record oyster countBriefingPost type: Briefings need Signed inSigned in
Evening briefing: the arts editionBriefingItem: Add to inherited (Signed in + Silver)Signed in for guests, then Silver once signed in
Weekend briefing: what to do on the harbor this weekendBriefingTerm: Weekend edition opens for 30 daysFree
Storm briefing: closures, shelters and the ferry scheduleBriefingItem: free until a date (7 days from seeding)Free, then Signed in
The port’s $90 million maintenance backlog, berth by berthReportTerm: Port budgets inherits Harbor Money (Gold + Silver); beats the post typeGold + Silver
Harborview’s pension gap is $1.2 billion. Here is how it grew.ReportTerm: Pensions’ own rule (Silver) beats Harbor Money and the post typeSilver
Every housing permit Harborview issued since 2015ReportPost type: Reports need Gold (teaser: first 60 words, no break block)Gold
What last winter’s storms really cost Tidewater PowerReportItem: embargo for 14 days from seeding, then openGold, then Free
Ferry ridership, ten years on: a free Ledger ReportReportItem: Public beats the post typeFree
The 2024 flood review: what the city promised, and what it builtReportPost type archive window: open after 365 daysFree
Where to eat in Lowmarket: a dumpling crawlCity guideNo rule anywhere: openFree
Three walks on Fennel Hill, with the best views of the harborCity guideTerm: Fennel Hill needs Silver (no post type rule)Silver
The Fennel Hill Saturday market, stall by stallCity guideItem: Public beats the Fennel Hill termFree
The insider’s guide to Gull Island by ferryCity guideItem: its own level (Gold) with no type or term ruleGold
Correction: the bridge vote countCorrectionGating off for Corrections: the Elections 2026 term rule does not applyFree
Who is running for council in 2026: every candidate, district by districtPostTerm on a core post: Topics → Elections 2026 needs Signed inSigned in
Dates count from the last seeding or restore: the storm briefing locks after 7 days, the Tidewater report opens after 14 and the Weekend edition’s Opens rule ends after 30. Restore test content starts them again. Locked items carry a LEDGER-SECRET-CPT-… marker; items that should be open to everyone carry LEDGER-OPEN-CPT-….

What to try

  1. Sign in. Use “Log in with Shopify” in the header. Shopify should send you to /auth-callback/ and then back to the page you started on. The Visitor state panel should say you are signed in, linked, and (for a new customer) a shadow user.
  2. Check every control. Sign-in controls shows the block in each mode. The page HTML is the same for everyone; only the hydrated control changes.
  3. Open the members area. Members area releases its content to any signed-in visitor. As a guest you should see a message and a sign-in button.
  4. Test tag rules. Tag gates has gates for gold-member, gold-member + silver-member, a teaser fallback, a tag nobody has, and an open control. Add or remove the tags on your customer in Shopify (or buy a mapped product, see Become a member) and reload.
  5. Try to leak the paywalled post. As a guest, open the members article, view its source, its RSS, its REST response and a search for the secret phrase. The phrase LEDGER-SECRET-MEMBERS-ONLY must not appear anywhere unless you are a gold-member.
  6. Read the Ledger as each account. Switch to each test account and open one story of each badge from the home page. The result should match the table above. Paywalled stories carry a LEDGER-SECRET-NEWS-… leak marker that must stay out of the source, feed, REST and search for anyone not entitled.
  7. Check the section rules. The Investigations stories have no gate block: the plugin’s content rules lock them (RedeemID → Access → Content rules, and each category’s edit screen). Harbor pilots follows the Gold column above, The arts council’s grant audit the Gold + Silver column (it is in Investigations and Culture), and Ferry fuel contract is open to everyone while its “Free to read” tag lasts. The post list’s Access column says where each story’s rule comes from. Change a category’s rule and reload a story: the change applies at once.
  8. Check the content types. Open each item in the table above as a guest and as each test account. Then try to leak them: search, the Reports feed and the REST routes (reports, briefings, guides). Change a post type row, a term rule or an item’s Access box and reload: the badge and the paywall follow at once. Corrections never lock, because gating is switched off for that post type.
  9. Refresh membership. Signed in and linked, use “Refresh membership” in the header (or in a story’s paywall box). It calls the plugin’s POST /redeemid/v1/account/sync and reloads; a second press within a minute says to wait. For a simulated test account it puts the seeded state back; for a real customer it asks Shopify, so a tag you just added in Shopify opens the matching stories.
  10. Check the features. Switch to each account and compare the header chips, a story’s sponsor slot and the Briefings page with the Features table. As Ada Add-on, remove ad-free-addon on RedeemID → Customers (or let a refund do it): the sponsor slot comes back on the next page, and she keeps Early briefing from Silver. RedeemID → Access → Test prints each account’s features with the route that grants them, and RedeemID → Access → Features lets you remap Ad-free reading.
  11. Redirect mode. Redirect gate sends non-members to the Become a member page.
  12. Link an existing account. Sign in with a plain WordPress (non-admin) user whose email matches your Shopify customer, then use “Connect Shopify account” on the Account page. Administrators are refused on purpose.
  13. Sign out. “Log out” should end both the WordPress and the Shopify session. Signing in again should ask Shopify for a code.
  14. Admin side. In the Shopify admin menu: customers, the webhook and app event logs, and debugging (register webhooks, diagnostics, and the dry run that shows the gate decision for any user). Test lab is the last item in that menu.

Not in the plugin yet, so not testable here: the account card, the full member menu (today the header shows only the feature chips) and a cart count. Catalog blocks come from Shopify’s own plugin, not RedeemID.