From c19afa4f1611ab1f8915452ee349635291e3921b Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 27 Sep 2021 20:49:00 +0200 Subject: [PATCH 01/14] outposts/proxy: fix duplicate protocol in domain auth mode Signed-off-by: Jens Langhammer --- internal/outpost/proxyv2/application/mode_forward.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/outpost/proxyv2/application/mode_forward.go b/internal/outpost/proxyv2/application/mode_forward.go index 58757bfaa..c5e25cb55 100644 --- a/internal/outpost/proxyv2/application/mode_forward.go +++ b/internal/outpost/proxyv2/application/mode_forward.go @@ -3,6 +3,7 @@ package application import ( "fmt" "net/http" + "net/url" "goauthentik.io/api" "goauthentik.io/internal/outpost/proxyv2/constants" @@ -38,7 +39,8 @@ func (a *Application) forwardHandleTraefik(rw http.ResponseWriter, r *http.Reque if *a.proxyConfig.Mode == api.PROXYMODE_FORWARD_SINGLE { host = web.GetHost(r) } else if *a.proxyConfig.Mode == api.PROXYMODE_FORWARD_DOMAIN { - host = a.proxyConfig.ExternalHost + eh, _ := url.Parse(a.proxyConfig.ExternalHost) + host = eh.Host } // set the redirect flag to the current URL we have, since we redirect // to a (possibly) different domain, but we want to be redirected back From c9c177d8f9b63f28e24acec67e98cdc737c6da68 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 29 Sep 2021 09:42:59 +0200 Subject: [PATCH 02/14] web/admin: don't require username nor name for activate/deactivate toggles closes #1491 Signed-off-by: Jens Langhammer --- web/src/locales/en.po | 3 +++ web/src/locales/pseudo-LOCALE.po | 3 +++ web/src/pages/users/UserListPage.ts | 2 -- web/src/pages/users/UserViewPage.ts | 21 ++++++++++++++++++++- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/web/src/locales/en.po b/web/src/locales/en.po index 63bdcc62f..623653975 100644 --- a/web/src/locales/en.po +++ b/web/src/locales/en.po @@ -155,6 +155,7 @@ msgid "Actions over the last 24 hours" msgstr "Actions over the last 24 hours" #: src/pages/users/UserListPage.ts +#: src/pages/users/UserViewPage.ts msgid "Activate" msgstr "Activate" @@ -1174,6 +1175,7 @@ msgid "Date Time" msgstr "Date Time" #: src/pages/users/UserListPage.ts +#: src/pages/users/UserViewPage.ts msgid "Deactivate" msgstr "Deactivate" @@ -4946,6 +4948,7 @@ msgstr "Use this tenant for each domain that doesn't have a dedicated tenant." #: src/pages/tokens/TokenForm.ts #: src/pages/tokens/TokenListPage.ts #: src/pages/users/UserListPage.ts +#: src/pages/users/UserViewPage.ts #: src/user/user-settings/tokens/UserTokenList.ts msgid "User" msgstr "User" diff --git a/web/src/locales/pseudo-LOCALE.po b/web/src/locales/pseudo-LOCALE.po index 2ef83d86f..67223e965 100644 --- a/web/src/locales/pseudo-LOCALE.po +++ b/web/src/locales/pseudo-LOCALE.po @@ -155,6 +155,7 @@ msgid "Actions over the last 24 hours" msgstr "" #: src/pages/users/UserListPage.ts +#: src/pages/users/UserViewPage.ts msgid "Activate" msgstr "" @@ -1168,6 +1169,7 @@ msgid "Date Time" msgstr "" #: src/pages/users/UserListPage.ts +#: src/pages/users/UserViewPage.ts msgid "Deactivate" msgstr "" @@ -4931,6 +4933,7 @@ msgstr "" #: src/pages/tokens/TokenForm.ts #: src/pages/tokens/TokenListPage.ts #: src/pages/users/UserListPage.ts +#: src/pages/users/UserViewPage.ts #: src/user/user-settings/tokens/UserTokenList.ts msgid "User" msgstr "" diff --git a/web/src/pages/users/UserListPage.ts b/web/src/pages/users/UserListPage.ts index ed9104e9f..ac5b8c383 100644 --- a/web/src/pages/users/UserListPage.ts +++ b/web/src/pages/users/UserListPage.ts @@ -157,8 +157,6 @@ export class UserListPage extends TablePage { ).coreUsersPartialUpdate({ id: item.pk || 0, patchedUserRequest: { - username: item.username, - name: item.name, isActive: !item.isActive, }, }); diff --git a/web/src/pages/users/UserViewPage.ts b/web/src/pages/users/UserViewPage.ts index 597b12c62..c34ad93a7 100644 --- a/web/src/pages/users/UserViewPage.ts +++ b/web/src/pages/users/UserViewPage.ts @@ -35,6 +35,7 @@ import "../../elements/oauth/UserCodeList"; import "../../elements/oauth/UserRefreshList"; import "../../elements/user/SessionList"; import "../../elements/user/UserConsentList"; +import "./UserActiveForm"; import "./UserForm"; @customElement("ak-user-view") @@ -132,7 +133,7 @@ export class UserViewPage extends LitElement {
- ${this.user.email} + ${this.user.email || "-"}
@@ -195,6 +196,24 @@ export class UserViewPage extends LitElement { + - + ${t`LDAP Attribute mapping`}