Local, password-only auth: - No public pages; everything outside /admin and /auth redirects in - First run (no users) sends every page to /auth/signup, which creates the super admin (user #1) once and then locks - Login is email/username + password; removed the emailed-code flow, /auth/sso and email password reset - Google login kept for existing accounts only, never creates them - seed-super-admin now requires SEED_SUPER_ADMIN_PASSWORD Bots-first admin: - /admin and closed sections (people, logs, backups) redirect to /admin/bots; only bots and settings are live (AdminSections) - Removed the old admin layout; every /admin page uses the bots rail - Coordinator bot created at signup/seed and by /admin/bots (ensureCoordinatorBot), which redirects to its chat - bots.system_prompt (markdown) with a default coordinator prompt - seed-bots reuses the existing coordinator Settings: - Sub pages general (default), profile, change-password, listed in the rail with a back link; unknown settings paths redirect to general - Redesigned settings UI: pane header, grouped rows, sticky save bar - General: System/Light/Dark theme, saved per device Co-Authored-By: Claude Opus 5.5 <[email protected]>
26 lines
1.0 KiB
TypeScript
26 lines
1.0 KiB
TypeScript
import { describe, expect, test } from "bun:test";
|
|
import isUnknownSettingsPath from "./is-unknown-settings-path";
|
|
|
|
describe("isUnknownSettingsPath", () => {
|
|
test("known settings pages and the settings root are not unknown", () => {
|
|
expect(isUnknownSettingsPath({ pathname: "/admin/settings" })).toBe(false);
|
|
expect(isUnknownSettingsPath({ pathname: "/admin/settings/" })).toBe(false);
|
|
expect(
|
|
isUnknownSettingsPath({ pathname: "/admin/settings/profile" }),
|
|
).toBe(false);
|
|
expect(
|
|
isUnknownSettingsPath({ pathname: "/admin/settings/change-password/" }),
|
|
).toBe(false);
|
|
});
|
|
|
|
test("other settings paths are unknown; non-settings paths are not", () => {
|
|
expect(
|
|
isUnknownSettingsPath({ pathname: "/admin/settings/password" }),
|
|
).toBe(true);
|
|
expect(
|
|
isUnknownSettingsPath({ pathname: "/admin/settings/profilex" }),
|
|
).toBe(true);
|
|
expect(isUnknownSettingsPath({ pathname: "/admin/bots/1" })).toBe(false);
|
|
});
|
|
});
|