feat(SEC-001): protect workspace bootstrap with turnstile
This commit is contained in:
@@ -27,7 +27,7 @@ def _render_workspace_recovery() -> None:
|
||||
"The requested workspace is unavailable. Start a new workspace or return to the welcome page."
|
||||
).classes("text-base text-slate-500 dark:text-slate-400")
|
||||
with ui.row().classes("mx-auto gap-3"):
|
||||
ui.link("Get started", "/workspaces/bootstrap").classes(
|
||||
ui.link("Get started", "/").classes(
|
||||
"rounded-lg bg-slate-900 px-5 py-3 text-sm font-semibold text-white no-underline dark:bg-slate-100 dark:text-slate-900"
|
||||
)
|
||||
ui.link("Go to welcome page", "/").classes(
|
||||
@@ -49,8 +49,7 @@ def settings_page(workspace_id: str) -> None:
|
||||
"""Settings page with workspace-scoped persistent portfolio configuration."""
|
||||
workspace_repo = get_workspace_repository()
|
||||
if not workspace_repo.workspace_exists(workspace_id):
|
||||
_render_workspace_recovery()
|
||||
return
|
||||
return RedirectResponse(url="/", status_code=307)
|
||||
|
||||
config = workspace_repo.load_portfolio_config(workspace_id)
|
||||
alert_service = AlertService()
|
||||
|
||||
Reference in New Issue
Block a user