7 Commits

Author SHA1 Message Date
XZH
5897382907 test(auth): stabilize heartbeat day rollover clock 2026-10-24 17:08:12 -07:00
polaris-smart
1a746ae1e8 style(tests): ruff-format the gate-semantics tests 2026-09-24 08:19:39 +08:00
polaris-smart
5357e0c29d refactor(auth): gate learner-only paths on "non-admin" instead of "exactly user"
Align the five remaining two-value gate idioms with the "only 'admin'
elevates" invariant that #1556 now documents: self-service learner-profile
access (_require_local_learner), the admin-managed learner-profile
GET/PUT target checks, the identity-layer set_learner_profile writer, and
device-credential activation (_active_account) admit every non-admin role
instead of only "user".

While the admitted vocabulary is still {"admin", "user"} this is
behavior-preserving; once "teacher"/"student" exist, ordinary accounts
keep learner profiles and device logins instead of being silently
excluded. Admins stay excluded everywhere, including admins carrying a
learner preset.

Tests: a teacher with a learner preset manages their own profile through
the self-service endpoints and via an admin actor; admins (even with a
learner preset) stay rejected at the self-service, admin-managed,
storage, and device-credential layers; a device credential issued for a
teacher logs in and reports the teacher role, while issuance for an admin
still fails closed.
2026-09-24 08:19:39 +08:00
Bingxi Zhao (Frank)
fc39543bc0 feat: integrate frontend backend and canonical routes 2026-09-01 22:24:29 +08:00
Bingxi Zhao (Frank)
15c79a055f Merge pull request #1122 from evan188199-tech/codex/feat-device-credentials
# Conflicts:
#	deeptutor/api/routers/auth.py
#	tests/multi_user/conftest.py
2026-08-31 20:33:29 +08:00
XZH
2488527bcb test(learner): isolate device credential auth patching 2026-08-30 18:47:57 -07:00
XZH
b0ff5f18b7 feat(learner): add revocable device login credentials (#1116) 2026-08-30 16:59:36 -07:00