diff --git a/server.py b/server.py index ded1139..fba56e6 100644 --- a/server.py +++ b/server.py @@ -836,16 +836,16 @@ async def ui_runs(request: Request): current_user = get_user_from_cookie(request) runs = list_all_runs() - # Filter runs by user if logged in - # Match both plain username and ActivityPub format (@user@domain) - if current_user: - actor_id = f"@{current_user}@{L2_DOMAIN}" - runs = [r for r in runs if r.username in (current_user, actor_id)] + # Require login to see runs + if not current_user: + return '

Login to see your runs.

' + + # Filter runs by user - match both plain username and ActivityPub format (@user@domain) + actor_id = f"@{current_user}@{L2_DOMAIN}" + runs = [r for r in runs if r.username in (current_user, actor_id)] if not runs: - if current_user: - return '

You have no runs yet. Use the CLI to start a run.

' - return '

No runs yet. Login to see your runs.

' + return '

You have no runs yet. Use the CLI to start a run.

' html_parts = ['
'] @@ -923,6 +923,10 @@ async def ui_cache_list(request: Request): """HTMX partial: list of cached items.""" current_user = get_user_from_cookie(request) + # Require login to see cache + if not current_user: + return '

Login to see cached content.

' + # Get all cached files cache_items = [] if CACHE_DIR.exists():