Admin dashboard (phase 1): users, disable, invite-gated signup
Adds an operator dashboard for self-hosters, gated on a passkey-
authenticated admin flag (ADMIN_UIDS env) and enforced server-side.
Backend:
- ADMIN_UIDS / INVITE_ONLY env (both off by default, OSS-friendly).
- Invite codes in db.json; /api/register gated when INVITE_ONLY, code
burned on successful signup.
- disabled users are rejected by readSession — locked out everywhere.
- /api/admin/{users,user,user/disable,invites,invites/new,invites/revoke}
behind an admin guard; /api/config exposes invite_only to the login UI.
- admin flag surfaced on /api/me, register/verify, login/verify.
Frontend:
- New /admin route + Settings link, shown only to admins: user list with
workout counts and last-sync, disable/enable, invite generation, and a
per-user workout-history drill-down.
- Registration sheet shows an invite-code field when the instance is
invite-only.
Phase 2 (live 'training now' via a heartbeat) is separate.
This commit is contained in:
1 parent
dabffdebc0
commit
046217079c
18 files changed
+338
-23
No files matched your search
@@ -352,5 +352,9 @@ export default {
|
||||
'Edit or delete this exercise': 'Übung bearbeiten oder löschen',
|
||||
'Remove from routine': 'Aus Routine entfernen',
|
||||
'Minimize': 'Verkleinern',
|
||||
'Expand': 'Vergrössern'
|
||||
'Expand': 'Vergrössern',
|
||||
'Invite code': 'Einladungscode',
|
||||
'This app is invite-only — enter the code you were given.': 'Diese App ist nur mit Einladung — gib den Code ein, den du erhalten hast.',
|
||||
'An invite code is required': 'Ein Einladungscode ist erforderlich',
|
||||
'Admin dashboard': 'Admin-Dashboard'
|
||||
}
|
||||
@@ -334,5 +334,9 @@ export default {
|
||||
'Edit or delete this exercise': 'Editar o eliminar este ejercicio',
|
||||
'Remove from routine': 'Quitar de la rutina',
|
||||
'Minimize': 'Minimizar',
|
||||
'Expand': 'Ampliar'
|
||||
'Expand': 'Ampliar',
|
||||
'Invite code': 'Código de invitación',
|
||||
'This app is invite-only — enter the code you were given.': 'Esta app es solo por invitación: introduce el código que te dieron.',
|
||||
'An invite code is required': 'Se requiere un código de invitación',
|
||||
'Admin dashboard': 'Panel de administración'
|
||||
}
|
||||
@@ -334,5 +334,9 @@ export default {
|
||||
'Edit or delete this exercise': 'Modifier ou supprimer cet exercice',
|
||||
'Remove from routine': 'Retirer de la routine',
|
||||
'Minimize': 'Réduire',
|
||||
'Expand': 'Agrandir'
|
||||
'Expand': 'Agrandir',
|
||||
'Invite code': 'Code d’invitation',
|
||||
'This app is invite-only — enter the code you were given.': 'Cette appli est sur invitation — saisissez le code qu’on vous a donné.',
|
||||
'An invite code is required': 'Un code d’invitation est requis',
|
||||
'Admin dashboard': 'Tableau d’administration'
|
||||
}
|
||||
@@ -334,5 +334,9 @@ export default {
|
||||
'Edit or delete this exercise': 'इस एक्सरसाइज़ को संपादित या हटाएं',
|
||||
'Remove from routine': 'रूटीन से हटाएं',
|
||||
'Minimize': 'छोटा करें',
|
||||
'Expand': 'बड़ा करें'
|
||||
'Expand': 'बड़ा करें',
|
||||
'Invite code': 'इनवाइट कोड',
|
||||
'This app is invite-only — enter the code you were given.': 'यह ऐप केवल इनवाइट से है — आपको दिया गया कोड डालें।',
|
||||
'An invite code is required': 'एक इनवाइट कोड आवश्यक है',
|
||||
'Admin dashboard': 'एडमिन डैशबोर्ड'
|
||||
}
|
||||
@@ -334,5 +334,9 @@ export default {
|
||||
'Edit or delete this exercise': 'Modifica o elimina questo esercizio',
|
||||
'Remove from routine': 'Rimuovi dalla routine',
|
||||
'Minimize': 'Riduci',
|
||||
'Expand': 'Ingrandisci'
|
||||
'Expand': 'Ingrandisci',
|
||||
'Invite code': 'Codice di invito',
|
||||
'This app is invite-only — enter the code you were given.': 'Questa app è solo su invito: inserisci il codice che hai ricevuto.',
|
||||
'An invite code is required': 'È richiesto un codice di invito',
|
||||
'Admin dashboard': 'Pannello di amministrazione'
|
||||
}
|
||||
@@ -334,5 +334,9 @@ export default {
|
||||
'Edit or delete this exercise': '이 운동 편집 또는 삭제',
|
||||
'Remove from routine': '루틴에서 제거',
|
||||
'Minimize': '축소',
|
||||
'Expand': '확대'
|
||||
'Expand': '확대',
|
||||
'Invite code': '초대 코드',
|
||||
'This app is invite-only — enter the code you were given.': '이 앱은 초대 전용입니다 — 받은 코드를 입력하세요.',
|
||||
'An invite code is required': '초대 코드가 필요합니다',
|
||||
'Admin dashboard': '관리자 대시보드'
|
||||
}
|
||||
@@ -334,5 +334,9 @@ export default {
|
||||
'Edit or delete this exercise': 'Edytuj lub usuń to ćwiczenie',
|
||||
'Remove from routine': 'Usuń z planu',
|
||||
'Minimize': 'Zmniejsz',
|
||||
'Expand': 'Powiększ'
|
||||
'Expand': 'Powiększ',
|
||||
'Invite code': 'Kod zaproszenia',
|
||||
'This app is invite-only — enter the code you were given.': 'Ta aplikacja jest tylko na zaproszenie — wpisz otrzymany kod.',
|
||||
'An invite code is required': 'Wymagany jest kod zaproszenia',
|
||||
'Admin dashboard': 'Panel administratora'
|
||||
}
|
||||
@@ -334,5 +334,9 @@ export default {
|
||||
'Edit or delete this exercise': 'Editar ou eliminar este exercício',
|
||||
'Remove from routine': 'Remover da rotina',
|
||||
'Minimize': 'Minimizar',
|
||||
'Expand': 'Ampliar'
|
||||
'Expand': 'Ampliar',
|
||||
'Invite code': 'Código de convite',
|
||||
'This app is invite-only — enter the code you were given.': 'Esta app é só por convite — introduz o código que recebeste.',
|
||||
'An invite code is required': 'É necessário um código de convite',
|
||||
'Admin dashboard': 'Painel de administração'
|
||||
}
|
||||
@@ -334,5 +334,9 @@ export default {
|
||||
'Edit or delete this exercise': 'Изменить или удалить это упражнение',
|
||||
'Remove from routine': 'Убрать из программы',
|
||||
'Minimize': 'Свернуть',
|
||||
'Expand': 'Развернуть'
|
||||
'Expand': 'Развернуть',
|
||||
'Invite code': 'Код приглашения',
|
||||
'This app is invite-only — enter the code you were given.': 'Приложение только по приглашению — введите выданный вам код.',
|
||||
'An invite code is required': 'Требуется код приглашения',
|
||||
'Admin dashboard': 'Панель администратора'
|
||||
}
|
||||
@@ -334,5 +334,9 @@ export default {
|
||||
'Edit or delete this exercise': 'Bu egzersizi düzenle veya sil',
|
||||
'Remove from routine': 'Rutinden çıkar',
|
||||
'Minimize': 'Küçült',
|
||||
'Expand': 'Büyüt'
|
||||
'Expand': 'Büyüt',
|
||||
'Invite code': 'Davet kodu',
|
||||
'This app is invite-only — enter the code you were given.': 'Bu uygulama yalnızca davetle — sana verilen kodu gir.',
|
||||
'An invite code is required': 'Bir davet kodu gerekli',
|
||||
'Admin dashboard': 'Yönetici paneli'
|
||||
}
|
||||
@@ -334,5 +334,9 @@ export default {
|
||||
'Edit or delete this exercise': '编辑或删除此动作',
|
||||
'Remove from routine': '从计划中移除',
|
||||
'Minimize': '缩小',
|
||||
'Expand': '放大'
|
||||
'Expand': '放大',
|
||||
'Invite code': '邀请码',
|
||||
'This app is invite-only — enter the code you were given.': '此应用仅限邀请——请输入你收到的邀请码。',
|
||||
'An invite code is required': '需要邀请码',
|
||||
'Admin dashboard': '管理后台'
|
||||
}
|
||||
Reference in new issue
Block a user