Hide /idp Create Account button in single-user mode (#290)#291
Merged
melvincarvalho merged 1 commit intoApr 22, 2026
Conversation
…erver#290) In single-user mode pod creation is disabled — POST /.pods and GET /idp/register both return 403. The /idp landing kept the Create Account button anyway, so a user clicking it on (e.g.) melvin.me landed on a Registration Disabled error page. Thread `singleUser` from idp/index.js into landingPage(ctx). When the flag is set: - Hide the Create Account button entirely. - Subtitle becomes "Single-user pod — sign in from any Solid app." - Sign-in note opens with "Sign in" rather than "Already have an account?" since registration isn't an option here. Pilot stays named as the example client. Pure rendering change — no new routes, no new behaviour, just stops the landing from offering a button it can't honour. Multi-user deployments are unchanged. Test: new "Single-user mode landing" describe block spins a server with `singleUser: true`, asserts the body has no Create Account button or /idp/register link, and confirms the subtitle reflects the single-user shape. Pilot link is still asserted present.
There was a problem hiding this comment.
Pull request overview
Updates the IdP landing page rendering so that, in single-user mode (where registration is disabled), the /idp page no longer presents a “Create Account” call-to-action that would lead users to a 403 page.
Changes:
- Thread
singleUserfromsrc/idp/index.jsintolandingPage(ctx)rendering context. - Conditionally suppress the “Create Account” button and adjust subtitle/sign-in copy in
src/idp/views.js. - Add regression tests covering the single-user
/idplanding behavior (no register CTA/link; updated subtitle; pilot link remains).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/idp/index.js | Passes singleUser option into the landing page render context. |
| src/idp/views.js | Adds ctx.singleUser-based branching to hide registration CTA and adjust copy. |
| test/idp.test.js | Adds a single-user-mode landing page test block to prevent regressions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
melvincarvalho
merged commit Apr 22, 2026
42a82a1
into
JavaScriptSolidServer:gh-pages
4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #290.
Symptom
In single-user mode, `POST /.pods` and `GET /idp/register` both 403 (registration is disabled). The `/idp` landing kept the Create Account button anyway, so clicking it landed on a "Registration Disabled" error page. Live on https://melvin.me/idp before this PR.
Change
Thread `singleUser` from `idp/index.js` into `landingPage(ctx)`. When the flag is set:
Pure rendering change — no new routes, no behaviour change for multi-user deployments.
Files
Test plan