From 3a88dde545ba832610038f55ccc5e2833ea2ebdc Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 13 Jun 2021 23:08:15 +0200 Subject: [PATCH] web: fix declaration of Intl Signed-off-by: Jens Langhammer --- authentik/core/api/applications.py | 1 - authentik/core/tests/test_applications_api.py | 4 ++-- outpost/pkg/ldap/instance_bind.go | 2 +- web/src/elements/sidebar/SidebarItem.ts | 2 +- web/src/flows/stages/identification/IdentificationStage.ts | 7 ------- web/src/global.d.ts | 7 +++++++ 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/authentik/core/api/applications.py b/authentik/core/api/applications.py index b576d9221..85dec5779 100644 --- a/authentik/core/api/applications.py +++ b/authentik/core/api/applications.py @@ -15,7 +15,6 @@ from rest_framework.fields import ( BooleanField, CharField, FileField, - IntegerField, ReadOnlyField, ) from rest_framework.parsers import MultiPartParser diff --git a/authentik/core/tests/test_applications_api.py b/authentik/core/tests/test_applications_api.py index 43c501a91..21c0edef6 100644 --- a/authentik/core/tests/test_applications_api.py +++ b/authentik/core/tests/test_applications_api.py @@ -26,7 +26,7 @@ class TestApplicationsAPI(APITestCase): def test_check_access(self): """Test check_access operation""" self.client.force_login(self.user) - response = self.client.post( + response = self.client.get( reverse( "authentik_api:application-check-access", kwargs={"slug": self.allowed.slug}, @@ -36,7 +36,7 @@ class TestApplicationsAPI(APITestCase): self.assertJSONEqual( force_str(response.content), {"messages": [], "passing": True} ) - response = self.client.post( + response = self.client.get( reverse( "authentik_api:application-check-access", kwargs={"slug": self.denied.slug}, diff --git a/outpost/pkg/ldap/instance_bind.go b/outpost/pkg/ldap/instance_bind.go index d9cffa69c..1df592ac5 100644 --- a/outpost/pkg/ldap/instance_bind.go +++ b/outpost/pkg/ldap/instance_bind.go @@ -177,7 +177,7 @@ func (pi *ProviderInstance) solveFlowChallenge(bindDN string, password string, c pi.log.Info("got ak-stage-access-denied") return false, ldap.LDAPResultInsufficientAccessRights default: - pi.log.Warning("unsupported challenge type: %s", ch.GetComponent()) + pi.log.WithField("component", ch.GetComponent()).Warning("unsupported challenge type") return false, ldap.LDAPResultOperationsError } response, _, err := responseReq.Execute() diff --git a/web/src/elements/sidebar/SidebarItem.ts b/web/src/elements/sidebar/SidebarItem.ts index 701575395..7ac55525d 100644 --- a/web/src/elements/sidebar/SidebarItem.ts +++ b/web/src/elements/sidebar/SidebarItem.ts @@ -173,7 +173,7 @@ export class SidebarItem extends LitElement { } return html`
  • ${this.path ? html` - + ` : html` diff --git a/web/src/flows/stages/identification/IdentificationStage.ts b/web/src/flows/stages/identification/IdentificationStage.ts index ff0cb674a..82ab644c4 100644 --- a/web/src/flows/stages/identification/IdentificationStage.ts +++ b/web/src/flows/stages/identification/IdentificationStage.ts @@ -21,13 +21,6 @@ export const PasswordManagerPrefill: { totp: undefined, }; -declare module Intl { - class ListFormat { - constructor(locale: string, args: { [key: string]: string }); - public format: (items: string[]) => string; - } -} - export const OR_LIST_FORMATTERS = new Intl.ListFormat("default", { style: "short", type: "disjunction" }); @customElement("ak-stage-identification") diff --git a/web/src/global.d.ts b/web/src/global.d.ts index cbe652dbe..16faa867a 100644 --- a/web/src/global.d.ts +++ b/web/src/global.d.ts @@ -1 +1,8 @@ declare module "*.css"; + +declare namespace Intl { + class ListFormat { + constructor(locale: string, args: { [key: string]: string }); + public format: (items: string[]) => string; + } +}