feat: add admin user management and disable public registration

This commit is contained in:
陈煜 committed 2026-10-05 14:08:39 +08:00
1 parent cfbba73791
commit 312a5ccb86
32 files changed
+1120 -69

No files matched your search

+3 -1
View File
@@ -1,3 +1,4 @@
import { provisionTestUser } from './user-fixture';
import { fixtureFetch } from './backup-fixture';
import 'dotenv/config';
import { test } from 'node:test';
@@ -34,7 +35,8 @@ test('real MySQL: groups, scheduled atomic execution, calendar, privacy and ZIP
const username = 'wp_update_' + randomUUID(),
password = randomBytes(18).toString('hex');
names.push(username);
const result = await call('/auth/register', '', 'POST', { username, password });
await provisionTestUser({ username, password });
const result = await call('/auth/login', '', 'POST', { username, password });
assert.equal(result.status, 201);
return {
cookie: result.cookie,