web: fix declaration of Intl

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-06-13 23:08:15 +02:00
parent 31fc4d1cb9
commit 3a88dde545
6 changed files with 11 additions and 12 deletions

View File

@ -15,7 +15,6 @@ from rest_framework.fields import (
BooleanField, BooleanField,
CharField, CharField,
FileField, FileField,
IntegerField,
ReadOnlyField, ReadOnlyField,
) )
from rest_framework.parsers import MultiPartParser from rest_framework.parsers import MultiPartParser

View File

@ -26,7 +26,7 @@ class TestApplicationsAPI(APITestCase):
def test_check_access(self): def test_check_access(self):
"""Test check_access operation""" """Test check_access operation"""
self.client.force_login(self.user) self.client.force_login(self.user)
response = self.client.post( response = self.client.get(
reverse( reverse(
"authentik_api:application-check-access", "authentik_api:application-check-access",
kwargs={"slug": self.allowed.slug}, kwargs={"slug": self.allowed.slug},
@ -36,7 +36,7 @@ class TestApplicationsAPI(APITestCase):
self.assertJSONEqual( self.assertJSONEqual(
force_str(response.content), {"messages": [], "passing": True} force_str(response.content), {"messages": [], "passing": True}
) )
response = self.client.post( response = self.client.get(
reverse( reverse(
"authentik_api:application-check-access", "authentik_api:application-check-access",
kwargs={"slug": self.denied.slug}, kwargs={"slug": self.denied.slug},

View File

@ -177,7 +177,7 @@ func (pi *ProviderInstance) solveFlowChallenge(bindDN string, password string, c
pi.log.Info("got ak-stage-access-denied") pi.log.Info("got ak-stage-access-denied")
return false, ldap.LDAPResultInsufficientAccessRights return false, ldap.LDAPResultInsufficientAccessRights
default: default:
pi.log.Warning("unsupported challenge type: %s", ch.GetComponent()) pi.log.WithField("component", ch.GetComponent()).Warning("unsupported challenge type")
return false, ldap.LDAPResultOperationsError return false, ldap.LDAPResultOperationsError
} }
response, _, err := responseReq.Execute() response, _, err := responseReq.Execute()

View File

@ -173,7 +173,7 @@ export class SidebarItem extends LitElement {
} }
return html`<li class="pf-c-nav__item"> return html`<li class="pf-c-nav__item">
${this.path ? html` ${this.path ? html`
<a href="${this.isAbsoluteLink ? '' : '#'}${this.path}" class="pf-c-nav__link ${this.isActive ? "pf-m-current" : ""}"> <a href="${this.isAbsoluteLink ? "" : "#"}${this.path}" class="pf-c-nav__link ${this.isActive ? "pf-m-current" : ""}">
<slot name="label"></slot> <slot name="label"></slot>
</a> </a>
` : html` ` : html`

View File

@ -21,13 +21,6 @@ export const PasswordManagerPrefill: {
totp: undefined, 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" }); export const OR_LIST_FORMATTERS = new Intl.ListFormat("default", { style: "short", type: "disjunction" });
@customElement("ak-stage-identification") @customElement("ak-stage-identification")

7
web/src/global.d.ts vendored
View File

@ -1 +1,8 @@
declare module "*.css"; declare module "*.css";
declare namespace Intl {
class ListFormat {
constructor(locale: string, args: { [key: string]: string });
public format: (items: string[]) => string;
}
}