Refactor Security Management: Split Security page into Users, Providers, and Policies components; remove deprecated Security component; implement CRUD functionality for users, providers, and policies; enhance Uptime page with monitor editing capabilities.

This commit is contained in:
Wikid82
2025-11-25 14:53:06 +00:00
parent 7a1f577771
commit 07be2155be
37 changed files with 4149 additions and 119 deletions

View File

@@ -57,6 +57,16 @@ vi.mock('../../hooks/useCertificates', () => ({
})),
}))
vi.mock('../../hooks/useSecurity', () => ({
useAuthPolicies: vi.fn(() => ({
policies: [
{ id: 1, name: 'Admin Only', description: 'Requires admin role' }
],
isLoading: false,
error: null,
})),
}))
vi.mock('../../api/proxyHosts', () => ({
testProxyHostConnection: vi.fn(),
}))
@@ -230,7 +240,9 @@ describe('ProxyHostForm', () => {
<ProxyHostForm onSubmit={mockOnSubmit} onCancel={mockOnCancel} />
)
const toggle = screen.getByLabelText('Enable Forward Auth (SSO)')
// The Forward Auth toggle now uses "Enable External Forward Auth" label
// and only appears when no Access Policy is selected (default is no policy)
const toggle = screen.getByLabelText('Enable External Forward Auth')
expect(toggle).not.toBeChecked()
// Bypass field should not be visible initially