Revert "Refine settings and panel preferences"

This reverts commit 760ab62c10.
This commit is contained in:
2026-04-02 01:08:45 +03:00
parent 02d1d0dc4b
commit e697694fe8
10 changed files with 285 additions and 852 deletions

View File

@@ -153,24 +153,6 @@ describe('panel api', () => {
expect(response.body.system.previewConfig).toContain('socks -p1180 -u2');
expect(response.body.service.lastEvent).toBe('System configuration updated from panel');
});
it('removes linked users when a service is deleted from settings', async () => {
const app = await createTestApp();
const token = await authorize(app);
const initial = await request(app).get('/api/state').set('Authorization', `Bearer ${token}`);
const system = createSystemPayload(initial.body);
system.services = system.services.filter((service) => service.id !== 'socks-main');
const response = await request(app).put('/api/system').set('Authorization', `Bearer ${token}`).send(system);
expect(response.status).toBe(200);
expect(response.body.userRecords.some((user: { username: string }) => user.username === 'night-shift')).toBe(
false,
);
expect(response.body.userRecords.some((user: { username: string }) => user.username === 'ops-east')).toBe(false);
expect(response.body.service.lastEvent).toMatch(/removed 2 linked users/i);
});
});
async function createTestApp() {