diff --git a/authentik/admin/tests/test_api.py b/authentik/admin/tests/test_api.py index 92fbd9b83..faa5d1397 100644 --- a/authentik/admin/tests/test_api.py +++ b/authentik/admin/tests/test_api.py @@ -74,21 +74,21 @@ class TestAdminAPI(TestCase): def test_version(self): """Test Version API""" - response = self.client.get(reverse("authentik_api:admin_version-list")) + response = self.client.get(reverse("authentik_api:admin_version")) self.assertEqual(response.status_code, 200) body = loads(response.content) self.assertEqual(body["version_current"], __version__) def test_workers(self): """Test Workers API""" - response = self.client.get(reverse("authentik_api:admin_workers-list")) + response = self.client.get(reverse("authentik_api:admin_workers")) self.assertEqual(response.status_code, 200) body = loads(response.content) self.assertEqual(body["pagination"]["count"], 0) def test_metrics(self): """Test metrics API""" - response = self.client.get(reverse("authentik_api:admin_metrics-list")) + response = self.client.get(reverse("authentik_api:admin_metrics")) self.assertEqual(response.status_code, 200) def test_apps(self): diff --git a/authentik/api/tests/test_config.py b/authentik/api/tests/test_config.py index 8e31e3ee0..91952be48 100644 --- a/authentik/api/tests/test_config.py +++ b/authentik/api/tests/test_config.py @@ -11,6 +11,6 @@ class TestConfig(APITestCase): def test_config(self): """Test YAML generation""" response = self.client.get( - reverse("authentik_api:configs-list"), + reverse("authentik_api:configs"), ) self.assertTrue(loads(response.content.decode())) diff --git a/web/src/pages/user-settings/UserSettingsPage.ts b/web/src/pages/user-settings/UserSettingsPage.ts index ee1bc1e12..75650bbba 100644 --- a/web/src/pages/user-settings/UserSettingsPage.ts +++ b/web/src/pages/user-settings/UserSettingsPage.ts @@ -21,8 +21,8 @@ import "../../elements/Tabs"; import "../../elements/PageHeader"; import "./tokens/UserTokenList"; import "./UserDetailsPage"; -import "./settings/UserSettingsAuthenticatorTOTP"; import "./settings/UserSettingsAuthenticatorStatic"; +import "./settings/UserSettingsAuthenticatorTOTP"; import "./settings/UserSettingsAuthenticatorWebAuthn"; import "./settings/UserSettingsPassword"; import "./settings/SourceSettingsOAuth"; diff --git a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorStatic.ts b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorStatic.ts index 399f9363e..a8c0e7b95 100644 --- a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorStatic.ts +++ b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorStatic.ts @@ -1,9 +1,10 @@ import { AuthenticatorsApi } from "authentik-api"; import { t } from "@lingui/macro"; -import { customElement, html, property, TemplateResult } from "lit-element"; +import { CSSResult, customElement, html, property, TemplateResult } from "lit-element"; import { until } from "lit-html/directives/until"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { FlowURLManager } from "../../../api/legacy"; +import { STATIC_TOKEN_STYLE } from "../../../flows/stages/authenticator_static/AuthenticatorStaticStage"; import { BaseUserSettings } from "./BaseUserSettings"; @customElement("ak-user-settings-authenticator-static") @@ -12,28 +13,42 @@ export class UserSettingsAuthenticatorStatic extends BaseUserSettings { @property({ type: Boolean }) configureFlow = false; + static get styles(): CSSResult[] { + return super.styles.concat(STATIC_TOKEN_STYLE); + } + renderEnabled(): TemplateResult { return html`
${t`Status: Enabled`}
+${t`Status: Enabled`}
-