diff --git a/web/src/admin/users/UserViewPage.ts b/web/src/admin/users/UserViewPage.ts
index f270f6dfdf..fe1c878cef 100644
--- a/web/src/admin/users/UserViewPage.ts
+++ b/web/src/admin/users/UserViewPage.ts
@@ -13,6 +13,7 @@ import { getRelativeTime } from "@goauthentik/app/common/utils";
import "@goauthentik/app/elements/oauth/UserAccessTokenList";
import "@goauthentik/app/elements/oauth/UserRefreshTokenList";
import "@goauthentik/app/elements/rbac/ObjectPermissionsPage";
+import "@goauthentik/app/elements/user/sources/SourceSettings";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { EVENT_REFRESH } from "@goauthentik/common/constants";
import { userTypeToLabel } from "@goauthentik/common/labels";
@@ -318,6 +319,16 @@ export class UserViewPage extends WithCapabilitiesConfig(AKElement) {
+
+
+
+
+
+
`;
}
diff --git a/web/src/common/styles/authentik.css b/web/src/common/styles/authentik.css
index 4ccabd8edd..790c4c4e10 100644
--- a/web/src/common/styles/authentik.css
+++ b/web/src/common/styles/authentik.css
@@ -150,3 +150,7 @@ html > form > input {
margin-top: 13rem;
}
}
+
+.pf-c-data-list {
+ padding-inline-start: 0;
+}
diff --git a/web/src/common/styles/theme-dark.css b/web/src/common/styles/theme-dark.css
index 764f66dd09..c49c1114e2 100644
--- a/web/src/common/styles/theme-dark.css
+++ b/web/src/common/styles/theme-dark.css
@@ -292,6 +292,7 @@ input[type="date"]::-webkit-calendar-picker-indicator {
}
/* data list */
.pf-c-data-list {
+ padding-inline-start: 0;
border-top-color: var(--ak-dark-background-lighter);
}
.pf-c-data-list__item {
diff --git a/web/src/user/user-settings/BaseUserSettings.ts b/web/src/elements/user/sources/BaseUserSettings.ts
similarity index 100%
rename from web/src/user/user-settings/BaseUserSettings.ts
rename to web/src/elements/user/sources/BaseUserSettings.ts
diff --git a/web/src/user/user-settings/sources/SourceSettings.ts b/web/src/elements/user/sources/SourceSettings.ts
similarity index 69%
rename from web/src/user/user-settings/sources/SourceSettings.ts
rename to web/src/elements/user/sources/SourceSettings.ts
index 203eef9f3d..d276d29e58 100644
--- a/web/src/user/user-settings/sources/SourceSettings.ts
+++ b/web/src/elements/user/sources/SourceSettings.ts
@@ -1,18 +1,16 @@
import { renderSourceIcon } from "@goauthentik/app/admin/sources/utils";
+import "@goauthentik/app/elements/user/sources/SourceSettingsOAuth";
+import "@goauthentik/app/elements/user/sources/SourceSettingsPlex";
+import "@goauthentik/app/elements/user/sources/SourceSettingsSAML";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { EVENT_REFRESH } from "@goauthentik/common/constants";
-import { me } from "@goauthentik/common/users";
import { AKElement } from "@goauthentik/elements/Base";
import "@goauthentik/elements/EmptyState";
-import "@goauthentik/user/user-settings/sources/SourceSettingsOAuth";
-import "@goauthentik/user/user-settings/sources/SourceSettingsPlex";
-import "@goauthentik/user/user-settings/sources/SourceSettingsSAML";
import { msg, str } from "@lit/localize";
import { CSSResult, TemplateResult, css, html } from "lit";
import { customElement, property } from "lit/decorators.js";
-import PFContent from "@patternfly/patternfly/components/Content/content.css";
import PFDataList from "@patternfly/patternfly/components/DataList/data-list.css";
import { PaginatedUserSourceConnectionList, SourcesApi, UserSetting } from "@goauthentik/api";
@@ -25,10 +23,15 @@ export class UserSourceSettingsPage extends AKElement {
@property({ attribute: false })
connections?: PaginatedUserSourceConnectionList;
+ @property({ type: Number })
+ userId?: number;
+
+ @property({ type: Boolean })
+ canConnect = true;
+
static get styles(): CSSResult[] {
return [
PFDataList,
- PFContent,
css`
.pf-c-data-list__cell {
display: flex;
@@ -57,10 +60,9 @@ export class UserSourceSettingsPage extends AKElement {
}
async firstUpdated(): Promise {
- const user = await me();
this.sourceSettings = await new SourcesApi(DEFAULT_CONFIG).sourcesAllUserSettingsList();
this.connections = await new SourcesApi(DEFAULT_CONFIG).sourcesUserConnectionsAllList({
- user: user.user.pk,
+ user: this.userId,
});
}
@@ -79,29 +81,26 @@ export class UserSourceSettingsPage extends AKElement {
switch (source.component) {
case "ak-user-settings-source-oauth":
return html``;
case "ak-user-settings-source-plex":
return html``;
case "ak-user-settings-source-saml":
return html``;
default:
@@ -112,23 +111,17 @@ export class UserSourceSettingsPage extends AKElement {
}
render(): TemplateResult {
- return html`
-
- ${msg(
- "Connect your user account to the services listed below, to allow you to login using the service instead of traditional credentials.",
- )}
-