feat(frontend): invite-based registration UI
Some checks failed
CI / Unit & Component Tests (push) Failing after 2m37s
CI / OCR Service Tests (push) Successful in 32s
CI / OCR Service Tests (pull_request) Successful in 30s
CI / Backend Unit Tests (push) Failing after 2m47s
CI / Unit & Component Tests (pull_request) Failing after 2m29s
CI / Backend Unit Tests (pull_request) Failing after 2m46s

- Add /register route with invite code prefill, password show/hide
- Add /login?registered=1 success banner
- Add /admin/invites page: list, create, revoke, copy link
- Add Einladungen nav section to admin sidebar (ADMIN_USER perm)
- Add invite error codes to errors.ts
- Add 48 i18n keys across de/en/es
- Update hooks.server.ts to allow public access to invite/register API

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-19 01:01:19 +02:00
parent 61fa35df67
commit daea748a20
22 changed files with 953 additions and 21 deletions

View File

@@ -56,14 +56,20 @@ describe('admin layout load — permission check', () => {
[{ id: 't1' }, { id: 't2' }, { id: 't3' }]
);
const mockFetch = vi.fn().mockResolvedValue({
ok: true,
json: async () => [{ id: 'i1' }, { id: 'i2' }]
});
const result = await load({
fetch: vi.fn() as unknown as typeof fetch,
fetch: mockFetch as unknown as typeof fetch,
locals: { user: adminUser }
});
expect(result.userCount).toBe(2);
expect(result.groupCount).toBe(1);
expect(result.tagCount).toBe(3);
expect(result.inviteCount).toBe(2);
expect(result.canManageUsers).toBe(true);
expect(result.canManageTags).toBe(true);
expect(result.canManagePermissions).toBe(true);