Admin shortcut in the account menu, switched on per study user from /admin; v2.25.0
Publish Container / build (push) Has been cancelled

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-12 16:03:41 -04:00
1 parent 853e758bab
commit d0741d628e
7 files changed
+40 -6

No files matched your search

+3
View File
@@ -70,6 +70,9 @@ export function register(app) {
subscribeNewsletter: user?.subscribeNewsletter !== false,
studyRemindersEnabled: user?.studyRemindersEnabled === true,
avatarUrl: user ? getStudyAvatarUrl(user) : '',
// Shows an Admin link in the account menu. Only the admin panel can turn this on, and the link
// still lands on the admin sign-in, so it grants no access by itself.
adminShortcut: user?.adminShortcut === true,
// Studies the student can open: enrolled ones plus any they have finished
enrolledStudySlugs: user ? getAccessibleStudySlugs(user) : [],
completedStudySlugs: Array.isArray(user?.completedStudySlugs) ? user.completedStudySlugs : [],