Files
DeepTutor/deeptutor/multi_user
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
..
2026-06-11 20:03:34 +08:00
2026-09-03 01:38:54 +08:00
2026-09-21 02:30:40 +08:00
2026-08-25 02:24:35 +08:00
2026-09-21 02:30:40 +08:00
2026-09-21 02:30:40 +08:00
2026-07-31 00:25:48 +08:00