Skip to content

Commit 2b079c9

Browse files
authored
docs(users,dashboard): describe smart login-redirect fallback (#173) (#190)
PR #183 changed the post-login redirect to fall back to the first sibling module's view route (instead of hard-coding "/", which 404s on apps without a root route) when the Dashboard module isn't installed. The docs still described the old "/" fallback. Update the users settings table and the dashboard "Replacing it" section, and record the change in the CHANGELOG Unreleased/Fixed section.
1 parent 91c4aa9 commit 2b079c9

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ All notable changes to this project are documented in this file. The format is b
1919
the resolver root, so the previous early-return excluded the very modules
2020
that need it. Cross-package bare imports (`maplibre-gl`, `pmtiles`, peer
2121
deps) now resolve in both wheel and workspace install modes (GH issue #156).
22+
- The `users` module's post-login redirect (`login_redirect_url`) no longer
23+
hard-codes a `/` fallback when the Dashboard module isn't installed — `/`
24+
404s on apps without a root route (e.g. `smpy_gis`, `--preset minimal`). It
25+
now redirects to the first sibling module that exposes view routes, falling
26+
back to `/` only as an absolute last resort. Operator-set overrides are
27+
always preserved (GH issue #173).
2228

2329
## [0.0.1] — 2026-04-21
2430

docs/modules/dashboard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ Top-level keys in `dashboard/locales/en.json`:
6969

7070
## Replacing it
7171

72-
If you want a different post-login landing page, set `users.login_redirect_url` in the [admin settings UI](/modules/settings) (or via `smpy settings import-from-env` from `SM_USERS_LOGIN_REDIRECT_URL`) to your route. You can keep the dashboard module installed for the menu entry, or set `SM_MODULES_ENABLED` without `dashboard` to drop it entirely. The `users` module auto-detects whether `dashboard` is installed and falls back to `/` if not.
72+
If you want a different post-login landing page, set `users.login_redirect_url` in the [admin settings UI](/modules/settings) (or via `smpy settings import-from-env` from `SM_USERS_LOGIN_REDIRECT_URL`) to your route. You can keep the dashboard module installed for the menu entry, or set `SM_MODULES_ENABLED` without `dashboard` to drop it entirely. The `users` module auto-detects whether `dashboard` is installed; if not, it redirects to the first other module that exposes view routes (e.g. the GIS module on apps like smpy_gis), falling back to `/` only as a last resort.

docs/modules/users.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Everything else is DB-backed (initial values are pydantic defaults; edit at `/se
140140
|---|---|
141141
| `allow_signup` | `False` |
142142
| `require_verification` | `True` |
143-
| `login_redirect_url` | `"/dashboard/"` (auto-falls back to `/` if dashboard module isn't installed) |
143+
| `login_redirect_url` | `"/dashboard/"` (if the Dashboard module isn't installed, auto-falls back to the first other module that exposes view routes, or `/` only as a last resort) |
144144
| `reset_password_token_lifetime_seconds` | `3600` |
145145
| `verification_token_lifetime_seconds` | `604_800` (7 days) |
146146
| `cookie_name` | `"sm_auth"` |

0 commit comments

Comments
 (0)