From bd831dc438c47e3a509e3f92f9027d962e0681e6 Mon Sep 17 00:00:00 2001 From: Ken Sternberg Date: Tue, 5 Sep 2023 13:13:53 -0700 Subject: [PATCH] web: Without error handling, this is complete, but I still need @BeryJu (Jens) for help with the SAML Upload (it doesn't appear to be correctly handled?) and the error handling. --- tests/wdio/scripts/check_local_chromedriver | 2 +- tests/wdio/scripts/update_local_chromedriver | 2 +- ...plication-wizard-authentication-by-ldap.ts | 1 - ...on-wizard-authentication-by-saml-import.ts | 42 ++++++++++++++++++- web/src/admin/applications/wizard/types.ts | 2 + web/src/components/ak-file-input.ts | 9 +++- 6 files changed, 52 insertions(+), 6 deletions(-) diff --git a/tests/wdio/scripts/check_local_chromedriver b/tests/wdio/scripts/check_local_chromedriver index 8a1da9996..b1ddd73e8 100755 --- a/tests/wdio/scripts/check_local_chromedriver +++ b/tests/wdio/scripts/check_local_chromedriver @@ -20,7 +20,7 @@ fi; # The path to the working folder for the test project, as a subfolder of the monorepo. This will be # help us find where the driver is kept for comparison. -SUBFOLDER="authentik-live-tests" +SUBFOLDER="wdio" # The variant of Chrome we expect under Linux. There are a lot of variants, like Midori, chromium, # chromium-browser, etc. If you're not running the version supplied by Google, you'll have to change diff --git a/tests/wdio/scripts/update_local_chromedriver b/tests/wdio/scripts/update_local_chromedriver index 41d81a050..a13eaa827 100755 --- a/tests/wdio/scripts/update_local_chromedriver +++ b/tests/wdio/scripts/update_local_chromedriver @@ -30,7 +30,7 @@ fi; # The path to the working folder for the test project, as a subfolder of the monorepo. This will be # help us find where the driver is kept for comparison. -SUBFOLDER="authentik-live-tests" +SUBFOLDER="wdio" # The variant of Chrome we expect under Linux. There are a lot of variants, like Midori, chromium, # chromium-browser, etc. If you're not running the version supplied by Google, you'll have to change diff --git a/web/src/admin/applications/wizard/methods/ldap/ak-application-wizard-authentication-by-ldap.ts b/web/src/admin/applications/wizard/methods/ldap/ak-application-wizard-authentication-by-ldap.ts index 7b9aa4d3f..2349af45b 100644 --- a/web/src/admin/applications/wizard/methods/ldap/ak-application-wizard-authentication-by-ldap.ts +++ b/web/src/admin/applications/wizard/methods/ldap/ak-application-wizard-authentication-by-ldap.ts @@ -117,7 +117,6 @@ export class ApplicationWizardApplicationDetails extends BaseProviderPanel { - + | Partial + | Partial | Partial | Partial | Partial diff --git a/web/src/components/ak-file-input.ts b/web/src/components/ak-file-input.ts index 96b748ce3..e4d81e013 100644 --- a/web/src/components/ak-file-input.ts +++ b/web/src/components/ak-file-input.ts @@ -2,7 +2,7 @@ import { AKElement } from "@goauthentik/elements/Base"; import { msg } from "@lit/localize"; import { html, nothing } from "lit"; -import { customElement, property } from "lit/decorators.js"; +import { customElement, property, query } from "lit/decorators.js"; @customElement("ak-file-input") export class AkFileInput extends AKElement { @@ -40,6 +40,13 @@ export class AkFileInput extends AKElement { @property({ type: String }) help = ""; + @query('input[type="file"]') + input!: HTMLInputElement; + + get files() { + return this.input.files; + } + render() { const currentMsg = this.value && this.current