chore: update queue dashboard authentication and improve course component handling

- Replaced email/token-based authentication with HTTP Basic Auth for the queue dashboard in production.
- Updated course components to use courseId instead of courseSlug for better consistency.
- Adjusted role-based security checks to utilize isStudentExperience for conditional rendering.
- Enhanced view-as-student functionality to redirect correctly based on courseId.
This commit is contained in:
Rotimi Best
2026-06-07 20:32:37 +01:00
parent 3561dc0fda
commit 48ce4d4d64
8 changed files with 45 additions and 64 deletions
+5 -10
View File
@@ -52,17 +52,12 @@ const envSchema = z.object({
/** Dashboard origin for invite/email links (e.g. https://app.yourdomain.com). When set, all email links point here instead of app.classroomio.com. Required for self-hosted. */
DASHBOARD_ORIGIN: z.string().optional(),
/**
* Comma-separated list of Better Auth user emails allowed to access the
* BullMQ dashboard at /admin/queues in production. Leave unset to keep the
* dashboard hidden everywhere except dev.
* Shared password for the /admin/queues HTTP Basic Auth prompt. When set, the
* dashboard mounts in production and challenges with `WWW-Authenticate: Basic`,
* accepting any username with this password — keeps the secret out of the
* URL/history. Leave unset to keep the dashboard hidden outside dev.
*/
QUEUE_DASHBOARD_ADMIN_EMAILS: z.string().optional(),
/**
* Bearer-token escape hatch for /admin/queues — useful for curl scripts or
* when SSO is unavailable. When set, requests with `Authorization: Bearer
* <token>` (or `?token=<token>`) bypass the email allowlist.
*/
QUEUE_DASHBOARD_TOKEN: z.string().optional(),
QUEUE_DASHBOARD_PASSWORD: z.string().optional(),
/** Optional Bearer token for Jina Reader (higher rate limits). */
JINA_API_KEY: z.string().optional(),
/** Max completed fetch_documentation_url calls per agent conversation (default 15). */