From f6b0eecde7fa015c341b38c5b89ffc3902f491fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelo=20Elizeche=20Land=C3=B3?= Date: Thu, 6 Mar 2025 09:15:15 -0300 Subject: [PATCH] stages/authenticator_email: Fix Enroll dropdown in the MFA Devices page (#13404) Implement missing ui_user_settings() in AuthenticatorEmailStage --- authentik/stages/authenticator_email/models.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/authentik/stages/authenticator_email/models.py b/authentik/stages/authenticator_email/models.py index d9e8c9a62c..495e1a2512 100644 --- a/authentik/stages/authenticator_email/models.py +++ b/authentik/stages/authenticator_email/models.py @@ -7,6 +7,7 @@ from django.utils.translation import gettext_lazy as _ from django.views import View from rest_framework.serializers import BaseSerializer +from authentik.core.types import UserSettingSerializer from authentik.events.models import Event, EventAction from authentik.flows.exceptions import StageInvalidException from authentik.flows.models import ConfigurableStage, FriendlyNamedStage, Stage @@ -71,6 +72,14 @@ class AuthenticatorEmailStage(ConfigurableStage, FriendlyNamedStage, Stage): def component(self) -> str: return "ak-stage-authenticator-email-form" + def ui_user_settings(self) -> UserSettingSerializer | None: + return UserSettingSerializer( + data={ + "title": self.friendly_name or str(self._meta.verbose_name), + "component": "ak-user-settings-authenticator-email", + } + ) + @property def backend_class(self) -> type[BaseEmailBackend]: """Get the email backend class to use"""