diff --git a/authentik/sources/ldap/signals.py b/authentik/sources/ldap/signals.py
index a89e39077..5cfc406f0 100644
--- a/authentik/sources/ldap/signals.py
+++ b/authentik/sources/ldap/signals.py
@@ -63,8 +63,8 @@ def ldap_sync_password(sender, user: User, password: str, **_):
if not sources.exists():
return
source = sources.first()
- changer = LDAPPasswordChanger(source)
try:
+ changer = LDAPPasswordChanger(source)
changer.change_password(user, password)
except LDAPOperationResult as exc:
Event.new(
diff --git a/web/src/admin/applications/ApplicationCheckAccessForm.ts b/web/src/admin/applications/ApplicationCheckAccessForm.ts
index ea5f6937c..b1ef4fb36 100644
--- a/web/src/admin/applications/ApplicationCheckAccessForm.ts
+++ b/web/src/admin/applications/ApplicationCheckAccessForm.ts
@@ -115,9 +115,8 @@ export class ApplicationCheckAccessForm extends Form<{ forUser: number }> {
`;
}
- renderForm(): TemplateResult {
- return html`
`;
+ ${this.result ? this.renderResult() : html``}`;
}
}
diff --git a/web/src/admin/crypto/CertificateGenerateForm.ts b/web/src/admin/crypto/CertificateGenerateForm.ts
index 7ccf46f29..aedc4d0a8 100644
--- a/web/src/admin/crypto/CertificateGenerateForm.ts
+++ b/web/src/admin/crypto/CertificateGenerateForm.ts
@@ -21,9 +21,12 @@ export class CertificateKeyPairForm extends Form {
});
};
- renderForm(): TemplateResult {
- return html``;
+ `;
}
}
diff --git a/web/src/admin/flows/FlowImportForm.ts b/web/src/admin/flows/FlowImportForm.ts
index 8f576abbf..07f004675 100644
--- a/web/src/admin/flows/FlowImportForm.ts
+++ b/web/src/admin/flows/FlowImportForm.ts
@@ -87,15 +87,13 @@ export class FlowImportForm extends Form {
`;
}
- renderForm(): TemplateResult {
- return html``;
+ ${this.result ? this.renderResult() : html``}`;
}
}
diff --git a/web/src/admin/groups/RelatedGroupList.ts b/web/src/admin/groups/RelatedGroupList.ts
index fb2429979..ca752ef09 100644
--- a/web/src/admin/groups/RelatedGroupList.ts
+++ b/web/src/admin/groups/RelatedGroupList.ts
@@ -46,41 +46,39 @@ export class RelatedGroupAdd extends Form<{ groups: string[] }> {
return data;
}
- renderForm(): TemplateResult {
- return html` `;
+ `;
}
}
diff --git a/web/src/admin/users/ServiceAccountForm.ts b/web/src/admin/users/ServiceAccountForm.ts
index 66af4be9b..0f1d9cc90 100644
--- a/web/src/admin/users/ServiceAccountForm.ts
+++ b/web/src/admin/users/ServiceAccountForm.ts
@@ -35,9 +35,8 @@ export class ServiceAccountForm extends Form {
this.result = undefined;
}
- renderRequestForm(): TemplateResult {
- return html``;
+ `;
}
renderResponseForm(): TemplateResult {
@@ -113,6 +111,6 @@ export class ServiceAccountForm extends Form {
if (this.result) {
return this.renderResponseForm();
}
- return this.renderRequestForm();
+ return super.renderForm();
}
}
diff --git a/web/src/admin/users/UserPasswordForm.ts b/web/src/admin/users/UserPasswordForm.ts
index b6de9eca0..4af6a7ab5 100644
--- a/web/src/admin/users/UserPasswordForm.ts
+++ b/web/src/admin/users/UserPasswordForm.ts
@@ -26,11 +26,13 @@ export class UserPasswordForm extends Form {
});
};
- renderForm(): TemplateResult {
- return html``;
+ renderInlineForm(): TemplateResult {
+ return html`
+
+ `;
}
}
diff --git a/web/src/admin/users/UserResetEmailForm.ts b/web/src/admin/users/UserResetEmailForm.ts
index e26d42738..cd9638abc 100644
--- a/web/src/admin/users/UserResetEmailForm.ts
+++ b/web/src/admin/users/UserResetEmailForm.ts
@@ -32,32 +32,34 @@ export class UserResetEmailForm extends Form
-
- => {
- const args: StagesAllListRequest = {
- ordering: "name",
- };
- if (query !== undefined) {
- args.search = query;
- }
- const stages = await new StagesApi(DEFAULT_CONFIG).stagesEmailList(args);
- return stages.results;
- }}
- .groupBy=${(items: Stage[]) => {
- return groupBy(items, (stage) => stage.verboseNamePlural);
- }}
- .renderElement=${(stage: Stage): string => {
- return stage.name;
- }}
- .value=${(stage: Stage | undefined): string | undefined => {
- return stage?.pk;
- }}
- >
-
-
- `;
+ renderInlineForm(): TemplateResult {
+ return html`
+ => {
+ const args: StagesAllListRequest = {
+ ordering: "name",
+ };
+ if (query !== undefined) {
+ args.search = query;
+ }
+ const stages = await new StagesApi(DEFAULT_CONFIG).stagesEmailList(args);
+ return stages.results;
+ }}
+ .groupBy=${(items: Stage[]) => {
+ return groupBy(items, (stage) => stage.verboseNamePlural);
+ }}
+ .renderElement=${(stage: Stage): string => {
+ return stage.name;
+ }}
+ .value=${(stage: Stage | undefined): string | undefined => {
+ return stage?.pk;
+ }}
+ >
+
+ `;
}
}
diff --git a/web/src/elements/forms/Form.ts b/web/src/elements/forms/Form.ts
index 5b80fe9ac..4d0c6e948 100644
--- a/web/src/elements/forms/Form.ts
+++ b/web/src/elements/forms/Form.ts
@@ -279,9 +279,23 @@ export abstract class Form extends AKElement {
}
renderForm(): TemplateResult {
+ const inline = this.renderInlineForm();
+ if (inline) {
+ return html``;
+ }
return html``;
}
+ /**
+ * Inline form render callback when inheriting this class, should be overwritten
+ * instead of `this.renderForm`
+ */
+ renderInlineForm(): TemplateResult | undefined {
+ return undefined;
+ }
+
renderNonFieldErrors(): TemplateResult {
if (!this.nonFieldErrors) {
return html``;