Skip to content

Allow browsing-mode users to get the backup Parsons problem - #1372

Merged
bnmnetp merged 2 commits into
RunestoneInteractive:mainfrom
aspadiyath:codetailor-anon-backup-parsons
Aug 14, 2026
Merged

Allow browsing-mode users to get the backup Parsons problem#1372
bnmnetp merged 2 commits into
RunestoneInteractive:mainfrom
aspadiyath:codetailor-anon-backup-parsons

Conversation

@aspadiyath

Copy link
Copy Markdown
Contributor

Previously /ns/coach/parsons_scaffolding required login unconditionally (Depends(auth_manager)), so logged-out/browsing-mode users got a hard 401 even when the exercise had a pre-authored, non-AI backup Parsons problem configured. Swap in an optional-auth dependency and, for anonymous users, serve the static backup when one exists; otherwise keep requiring login for the CodeTailor/LLM-personalized path.

Previously /ns/coach/parsons_scaffolding required login unconditionally
(Depends(auth_manager)), so logged-out/browsing-mode users got a hard 401
even when the exercise had a pre-authored, non-AI backup Parsons problem
configured. Swap in an optional-auth dependency and, for anonymous users,
serve the static backup when one exists; otherwise keep requiring login
for the CodeTailor/LLM-personalized path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aspadiyath
aspadiyath requested a review from bnmnetp as a code owner August 14, 2026 19:07
Comment thread bases/rsptx/book_server_api/routers/coach.py Outdated
Comment thread bases/rsptx/book_server_api/routers/coach.py Outdated
@bnmnetp

bnmnetp commented Aug 14, 2026

Copy link
Copy Markdown
Member

I was just about to start a build of all of the servers to deploy tomorrow morning. I can hold off for a couple of hours if you think you can address my comment today.

@aspadiyath

Copy link
Copy Markdown
Contributor Author

Yes I can do that in a couple moments, thanks for holding off!

Per review feedback: relocate the optional-auth dependency out of coach.py
and into components/rsptx/auth/session.py (alongside auth_manager) so other
endpoints can reuse it, and drop the leading underscore now that it's a
public helper.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aspadiyath
aspadiyath requested a review from bnmnetp August 14, 2026 19:35
@bnmnetp
bnmnetp merged commit 540bda8 into RunestoneInteractive:main Aug 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants