Commit a3bed8b
committed
Hide /idp Create Account button in single-user mode (JavaScriptSolidServer#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.1 parent 3d56094 commit a3bed8b
3 files changed
Lines changed: 67 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
558 | | - | |
559 | | - | |
560 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
561 | 563 | | |
562 | 564 | | |
563 | 565 | | |
| 566 | + | |
564 | 567 | | |
565 | 568 | | |
566 | 569 | | |
| |||
607 | 610 | | |
608 | 611 | | |
609 | 612 | | |
610 | | - | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
611 | 616 | | |
612 | 617 | | |
613 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
614 | 621 | | |
615 | 622 | | |
616 | | - | |
| 623 | + | |
617 | 624 | | |
618 | 625 | | |
619 | 626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
359 | 412 | | |
360 | 413 | | |
361 | 414 | | |
| |||
0 commit comments