fix: automatically link user without prompt (#8487)

# Which Problems Are Solved

There were UX issue with the autolinking prompt page and users were not
able to link their account or would not understand what to do. Since the
trust to the IdP is already bound by the configuration, the user can
directly be linked without any user input.

# How the Problems Are Solved

- remove the prompt page and directly link the user if possible
- remove corresponding customization texts from the API and Console

# Additional Changes

None

# Additional Context

- relates to https://github.com/zitadel/zitadel/issues/7977
- discussed with customers
- created as a `fix` to be able to backport

---------

Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
Livio Spring
2024-08-28 05:33:20 +00:00
committed by GitHub
co-authored by Max Peintner
parent bc2c2feefd
commit ca8f82423a
35 changed files with 21 additions and 491 deletions
@@ -15,7 +15,6 @@ import {
InitPasswordDoneScreenText,
InitPasswordScreenText,
LinkingUserDoneScreenText,
LinkingUserPromptScreenText,
LoginScreenText,
LogoutDoneScreenText,
MFAProvidersText,
@@ -377,12 +376,5 @@ export function mapRequestValues(map: Partial<Map>, req: Req): Req {
r34.setUsernameLabel(map.externalRegistrationUserOverviewText?.usernameLabel ?? '');
req.setExternalRegistrationUserOverviewText(r34);
const r35 = new LinkingUserPromptScreenText();
r35.setTitle(map.linkingUserPromptText?.title ?? '');
r35.setDescription(map.linkingUserPromptText?.description ?? '');
r35.setLinkButtonText(map.linkingUserPromptText?.linkButtonText ?? '');
r35.setOtherButtonText(map.linkingUserPromptText?.otherButtonText ?? '');
req.setLinkingUserPromptText(r35);
return req;
}
@@ -41,7 +41,6 @@ const KeyNamesArray = [
'initPasswordText',
'initializeDoneText',
'initializeUserText',
'linkingUserPromptText',
'linkingUserDoneText',
'loginText',
'logoutText',
-1
View File
@@ -1627,7 +1627,6 @@
"initPasswordText": "Инициализиране на парола",
"initializeDoneText": "Инициализирането на потребителя е готово",
"initializeUserText": "Инициализирайте потребителя",
"linkingUserPromptText": "Потребителският промпт за свързване",
"linkingUserDoneText": "Свързването на потребителя е готово",
"loginText": "Влизам",
"logoutText": "Излез от профила си",
-1
View File
@@ -1628,7 +1628,6 @@
"initPasswordText": "Inicializace hesla",
"initializeDoneText": "Inicializace uživatele dokončena",
"initializeUserText": "Inicializace uživatele",
"linkingUserPromptText": "Uživatelský propojovací text",
"linkingUserDoneText": "Propojení uživatele dokončeno",
"loginText": "Přihlášení",
"logoutText": "Odhlášení",
-1
View File
@@ -1628,7 +1628,6 @@
"initPasswordText": "Passwort Initialisierung",
"initializeDoneText": "Benutzereinrichtung erfolgreich",
"initializeUserText": "Benutzereinrichtung",
"linkingUserPromptText": "Aufforderung zur Benutzerverlinkung",
"linkingUserDoneText": "Benutzerverlinkung erfolgreich",
"loginText": "Anmelden",
"logoutText": "Abmelden",
-1
View File
@@ -1628,7 +1628,6 @@
"initPasswordText": "Initialize password",
"initializeDoneText": "Initialize user done",
"initializeUserText": "Initialize user",
"linkingUserPromptText": "Linking user prompt",
"linkingUserDoneText": "Linking user done",
"loginText": "Login",
"logoutText": "Logout",
-1
View File
@@ -1629,7 +1629,6 @@
"initPasswordText": "Inicializar contraseña",
"initializeDoneText": "Inicializar usuario, hecho",
"initializeUserText": "Inicializar usuario",
"linkingUserPromptText": "Mensaje de enlace de usuario",
"linkingUserDoneText": "Vinculación de usuario, hecho",
"loginText": "Iniciar sesión",
"logoutText": "Cerrar sesión",
-1
View File
@@ -1628,7 +1628,6 @@
"initPasswordText": "Initialiser le mot de passe",
"initializeDoneText": "Initialiser l'utilisateur terminé",
"initializeUserText": "Initialiser l'utilisateur",
"linkingUserPromptText": "Message de liaison utilisateur",
"linkingUserDoneText": "Lier l'utilisateur fait",
"loginText": "Connexion",
"logoutText": "Déconnexion",
-1
View File
@@ -1628,7 +1628,6 @@
"initPasswordText": "Inizializzazione della password",
"initializeDoneText": "Inizializzazione utente finita",
"initializeUserText": "Inizializzazione utente",
"linkingUserPromptText": "Testo di promemoria per collegare l'utente",
"linkingUserDoneText": "Collegamento dell'utente finito",
"loginText": "Accesso",
"logoutText": "Logout",
-1
View File
@@ -1624,7 +1624,6 @@
"initPasswordText": "パスワードを初期化する",
"initializeDoneText": "ユーザーの初期化が完了しました",
"initializeUserText": "ユーザーを初期化する",
"linkingUserPromptText": "ユーザーのリンクプロンプト",
"linkingUserDoneText": "ユーザーのリンクが完了しました",
"loginText": "ログイン",
"logoutText": "ログアウト",
-1
View File
@@ -1629,7 +1629,6 @@
"initPasswordText": "Иницијализација на лозинка",
"initializeDoneText": "Иницијализацијата на корисникот е завршена",
"initializeUserText": "Иницијализација на корисник",
"linkingUserPromptText": "Поврзување на кориснички промпт",
"linkingUserDoneText": "Поврзувањето на корисникот е завршено",
"loginText": "Најава",
"logoutText": "Одјава",
-1
View File
@@ -1628,7 +1628,6 @@
"initPasswordText": "Initialiseer wachtwoord",
"initializeDoneText": "Gebruiker initialisatie voltooid",
"initializeUserText": "Initialiseer gebruiker",
"linkingUserPromptText": "Gebruiker koppelingsprompt",
"linkingUserDoneText": "Gebruiker koppeling voltooid",
"loginText": "Login",
"logoutText": "Uitloggen",
-1
View File
@@ -1627,7 +1627,6 @@
"initPasswordText": "Inicjalizacja hasła",
"initializeDoneText": "Inicjalizacja użytkownika zakończona",
"initializeUserText": "Inicjalizacja użytkownika",
"linkingUserPromptText": "Komunikat o łączeniu użytkowników",
"linkingUserDoneText": "Łączenie użytkownika zakończone",
"loginText": "Zaloguj się",
"logoutText": "Wyloguj się",
-1
View File
@@ -1629,7 +1629,6 @@
"initPasswordText": "Inicialização de senha",
"initializeDoneText": "Inicialização de usuário concluída",
"initializeUserText": "Inicializaçãode usuário",
"linkingUserPromptText": "Prompt de usuário para vinculação",
"linkingUserDoneText": "Vinculação de usuário concluída",
"loginText": "Login",
"logoutText": "Logout",
-1
View File
@@ -1693,7 +1693,6 @@
"initPasswordText": "Инициализировать пароль",
"initializeDoneText": "Инициализация пользователя выполнена",
"initializeUserText": "Инициализировать пользователя",
"linkingUserPromptText": "Текст приглашения к привязке пользователя",
"linkingUserDoneText": "Привязка пользователя выполнена",
"loginText": "Вход",
"logoutText": "Выход",
-1
View File
@@ -1632,7 +1632,6 @@
"initPasswordText": "Initiera lösenord",
"initializeDoneText": "Initiera användare klart",
"initializeUserText": "Initiera användare",
"linkingUserPromptText": "Länka användarprompt",
"linkingUserDoneText": "Länka användare klart",
"loginText": "Inloggning",
"logoutText": "Utloggning",
-1
View File
@@ -1627,7 +1627,6 @@
"initPasswordText": "初始化密码",
"initializeDoneText": "初始化用户完成",
"initializeUserText": "初始化用户",
"linkingUserPromptText": "用户链接提示",
"linkingUserDoneText": "链接用户完成",
"loginText": "登录",
"logoutText": "登出",
@@ -172,7 +172,6 @@ func SetLoginTextToDomain(req *admin_pb.SetCustomLoginTextsRequest) *domain.Cust
result.RegistrationUser = text.RegistrationUserScreenTextPbToDomain(req.RegistrationUserText)
result.ExternalRegistrationUserOverview = text.ExternalRegistrationUserOverviewScreenTextPbToDomain(req.ExternalRegistrationUserOverviewText)
result.RegistrationOrg = text.RegistrationOrgScreenTextPbToDomain(req.RegistrationOrgText)
result.LinkingUserPrompt = text.LinkingUserPromptScreenTextPbToDomain(req.LinkingUserPromptText)
result.LinkingUsersDone = text.LinkingUserDoneScreenTextPbToDomain(req.LinkingUserDoneText)
result.ExternalNotFound = text.ExternalUserNotFoundScreenTextPbToDomain(req.ExternalUserNotFoundText)
result.LoginSuccess = text.SuccessLoginScreenTextPbToDomain(req.SuccessLoginText)
-1
View File
@@ -1063,7 +1063,6 @@ func (s *Server) getCustomLoginTexts(ctx context.Context, org string, languages
RegistrationUserText: text_grpc.RegistrationUserScreenTextToPb(text.RegistrationUser),
ExternalRegistrationUserOverviewText: text_grpc.ExternalRegistrationUserOverviewScreenTextToPb(text.ExternalRegistrationUserOverview),
RegistrationOrgText: text_grpc.RegistrationOrgScreenTextToPb(text.RegistrationOrg),
LinkingUserPromptText: text_grpc.LinkingUserPromptScreenTextToPb(text.LinkingUserPrompt),
LinkingUserDoneText: text_grpc.LinkingUserDoneScreenTextToPb(text.LinkingUsersDone),
ExternalUserNotFoundText: text_grpc.ExternalUserNotFoundScreenTextToPb(text.ExternalNotFound),
SuccessLoginText: text_grpc.SuccessLoginScreenTextToPb(text.LoginSuccess),
@@ -171,7 +171,6 @@ func SetLoginCustomTextToDomain(req *mgmt_pb.SetCustomLoginTextsRequest) *domain
result.RegistrationUser = text.RegistrationUserScreenTextPbToDomain(req.RegistrationUserText)
result.ExternalRegistrationUserOverview = text.ExternalRegistrationUserOverviewScreenTextPbToDomain(req.ExternalRegistrationUserOverviewText)
result.RegistrationOrg = text.RegistrationOrgScreenTextPbToDomain(req.RegistrationOrgText)
result.LinkingUserPrompt = text.LinkingUserPromptScreenTextPbToDomain(req.LinkingUserPromptText)
result.LinkingUsersDone = text.LinkingUserDoneScreenTextPbToDomain(req.LinkingUserDoneText)
result.ExternalNotFound = text.ExternalUserNotFoundScreenTextPbToDomain(req.ExternalUserNotFoundText)
result.LoginSuccess = text.SuccessLoginScreenTextPbToDomain(req.SuccessLoginText)
-19
View File
@@ -64,7 +64,6 @@ func CustomLoginTextToPb(text *domain.CustomLoginText) *text_pb.LoginCustomText
RegistrationUserText: RegistrationUserScreenTextToPb(text.RegistrationUser),
ExternalRegistrationUserOverviewText: ExternalRegistrationUserOverviewScreenTextToPb(text.ExternalRegistrationUserOverview),
RegistrationOrgText: RegistrationOrgScreenTextToPb(text.RegistrationOrg),
LinkingUserPromptText: LinkingUserPromptScreenTextToPb(text.LinkingUserPrompt),
LinkingUserDoneText: LinkingUserDoneScreenTextToPb(text.LinkingUsersDone),
ExternalUserNotFoundText: ExternalUserNotFoundScreenTextToPb(text.ExternalNotFound),
SuccessLoginText: SuccessLoginScreenTextToPb(text.LoginSuccess),
@@ -424,15 +423,6 @@ func LinkingUserDoneScreenTextToPb(text domain.LinkingUserDoneScreenText) *text_
}
}
func LinkingUserPromptScreenTextToPb(text domain.LinkingUserPromptScreenText) *text_pb.LinkingUserPromptScreenText {
return &text_pb.LinkingUserPromptScreenText{
Title: text.Title,
Description: text.Description,
LinkButtonText: text.LinkButtonText,
OtherButtonText: text.OtherButtonText,
}
}
func ExternalUserNotFoundScreenTextToPb(text domain.ExternalUserNotFoundScreenText) *text_pb.ExternalUserNotFoundScreenText {
return &text_pb.ExternalUserNotFoundScreenText{
Title: text.Title,
@@ -902,15 +892,6 @@ func RegistrationOrgScreenTextPbToDomain(text *text_pb.RegistrationOrgScreenText
}
}
func LinkingUserPromptScreenTextPbToDomain(text *text_pb.LinkingUserPromptScreenText) domain.LinkingUserPromptScreenText {
return domain.LinkingUserPromptScreenText{
Title: text.GetTitle(),
Description: text.GetDescription(),
LinkButtonText: text.GetLinkButtonText(),
OtherButtonText: text.GetOtherButtonText(),
}
}
func LinkingUserDoneScreenTextPbToDomain(text *text_pb.LinkingUserDoneScreenText) domain.LinkingUserDoneScreenText {
if text == nil {
return domain.LinkingUserDoneScreenText{}
@@ -455,9 +455,9 @@ func (l *Login) handleExternalUserAuthenticated(
// checkAutoLinking checks if a user with the provided information (username or email) already exists within ZITADEL.
// The decision, which information will be checked is based on the IdP template option.
// The function returns a boolean whether a user was found or not.
// If single a user was found, it will be automatically linked.
func (l *Login) checkAutoLinking(w http.ResponseWriter, r *http.Request, authReq *domain.AuthRequest, provider *query.IDPTemplate, externalUser *domain.ExternalUser) bool {
queries := make([]query.SearchQuery, 0, 2)
var user *query.NotifyUser
switch provider.AutoLinking {
case domain.AutoLinkingOptionUnspecified:
// is auto linking is disable, we shouldn't even get here, but in case we do we can directly return
@@ -472,7 +472,7 @@ func (l *Login) checkAutoLinking(w http.ResponseWriter, r *http.Request, authReq
if err != nil {
return false
}
l.renderLinkingUserPrompt(w, r, authReq, user, nil)
l.autoLinkUser(w, r, authReq, user)
return true
}
// If a specific org has been requested, we'll check the provided username against usernames (of that org).
@@ -501,10 +501,22 @@ func (l *Login) checkAutoLinking(w http.ResponseWriter, r *http.Request, authReq
if err != nil {
return false
}
l.renderLinkingUserPrompt(w, r, authReq, user, nil)
l.autoLinkUser(w, r, authReq, user)
return true
}
func (l *Login) autoLinkUser(w http.ResponseWriter, r *http.Request, authReq *domain.AuthRequest, user *query.NotifyUser) {
if err := l.authRepo.SelectUser(r.Context(), authReq.ID, user.ID, authReq.AgentID); err != nil {
l.renderError(w, r, authReq, err)
return
}
if err := l.authRepo.LinkExternalUsers(r.Context(), authReq.ID, authReq.AgentID, domain.BrowserInfoFromRequest(r)); err != nil {
l.renderError(w, r, authReq, err)
return
}
l.renderNextStep(w, r, authReq)
}
// externalUserNotExisting is called if an externalAuthentication couldn't find a corresponding externalID
// possible solutions are:
//
@@ -1,62 +0,0 @@
package login
import (
"net/http"
"github.com/zitadel/zitadel/internal/domain"
"github.com/zitadel/zitadel/internal/query"
)
const (
tmplLinkingUserPrompt = "link_user_prompt"
)
type linkingUserPromptData struct {
userData
Username string
Linking domain.AutoLinkingOption
UserID string
}
type linkingUserPromptFormData struct {
OtherUser bool `schema:"other"`
UserID string `schema:"userID"`
}
func (l *Login) renderLinkingUserPrompt(w http.ResponseWriter, r *http.Request, authReq *domain.AuthRequest, user *query.NotifyUser, err error) {
var errID, errMessage string
if err != nil {
errID, errMessage = l.getErrorMessage(r, err)
}
translator := l.getTranslator(r.Context(), authReq)
identification := user.PreferredLoginName
// hide the suffix in case the option is set and the auth request has been started with the primary domain scope
if authReq.RequestedOrgDomain && authReq.LabelPolicy != nil && authReq.LabelPolicy.HideLoginNameSuffix {
identification = user.Username
}
data := &linkingUserPromptData{
Username: identification,
UserID: user.ID,
userData: l.getUserData(r, authReq, translator, "LinkingUserPrompt.Title", "LinkingUserPrompt.Description", errID, errMessage),
}
l.renderer.RenderTemplate(w, r, translator, l.renderer.Templates[tmplLinkingUserPrompt], data, nil)
}
func (l *Login) handleLinkingUserPrompt(w http.ResponseWriter, r *http.Request) {
data := new(linkingUserPromptFormData)
authReq, err := l.ensureAuthRequestAndParseData(r, data)
if err != nil {
l.renderLogin(w, r, authReq, err)
return
}
if data.OtherUser {
l.renderExternalNotFoundOption(w, r, authReq, nil, nil, nil, nil)
return
}
err = l.authRepo.SelectUser(r.Context(), authReq.ID, data.UserID, authReq.AgentID)
if err != nil {
l.renderLogin(w, r, authReq, err)
return
}
l.renderNextStep(w, r, authReq)
}
-1
View File
@@ -83,7 +83,6 @@ func CreateRenderer(pathPrefix string, staticStorage static.Storage, cookieName
tmplLDAPLogin: "ldap_login.html",
tmplDeviceAuthUserCode: "device_usercode.html",
tmplDeviceAuthAction: "device_action.html",
tmplLinkingUserPrompt: "link_user_prompt.html",
}
funcs := map[string]interface{}{
"resourceUrl": func(file string) string {
-1
View File
@@ -124,6 +124,5 @@ func CreateRouter(login *Login, interceptors ...mux.MiddlewareFunc) *mux.Router
router.SkipClean(true).Handle("", http.RedirectHandler(HandlerPrefix+"/", http.StatusMovedPermanently))
router.HandleFunc(EndpointDeviceAuth, login.handleDeviceAuthUserCode).Methods(http.MethodGet, http.MethodPost)
router.HandleFunc(EndpointDeviceAuthAction, login.handleDeviceAuthAction).Methods(http.MethodGet, http.MethodPost)
router.HandleFunc(EndpointLinkingUserPrompt, login.handleLinkingUserPrompt).Methods(http.MethodPost)
return router
}
@@ -1,37 +0,0 @@
{{template "main-top" .}}
<div class="lgn-head">
<h1>{{t "LinkingUserPrompt.Title"}}</h1>
<p>
{{t "LinkingUserPrompt.Description"}}<br>
{{.Username}}
</p>
</div>
<form action="{{ linkingUserPromptUrl }}" method="POST">
{{ .CSRF }}
<input type="hidden" name="authRequestID" value="{{ .AuthReqID }}" />
<input type="hidden" name="userID" value="{{ .UserID }}" />
{{template "error-message" .}}
<div class="lgn-actions lgn-reverse-order">
<a class="lgn-icon-button lgn-left-action" id="back-button" href="#">
<i class="lgn-icon-arrow-left-solid"></i>
</a>
<button class="lgn-raised-button lgn-primary lgn-initial-focus" id="submit-button" type="submit">{{t "LinkingUserPrompt.LinkButtonText"}}</button>
<span class="fill-space"></span>
<button class="lgn-stroked-button" name="other" value="true">{{t "LinkingUserPrompt.OtherButtonText"}}</button>
</div>
</form>
<script src="{{ resourceUrl "scripts/form_submit.js" }}"></script>
<script src="{{ resourceUrl "scripts/default_form_validation.js" }}"></script>
<script src="{{ resourceUrl "scripts/input_suffix_offset.js" }}"></script>
<script src="{{ resourceUrl "scripts/go_back.js" }}"></script>
{{template "main-bottom" .}}
-22
View File
@@ -42,7 +42,6 @@ func (c *Commands) createAllLoginTextEvents(ctx context.Context, agg *eventstore
events = append(events, c.createRegistrationUserEvents(ctx, agg, existingText, text, defaultText)...)
events = append(events, c.createExternalRegistrationUserOverviewEvents(ctx, agg, existingText, text, defaultText)...)
events = append(events, c.createRegistrationOrgEvents(ctx, agg, existingText, text, defaultText)...)
events = append(events, c.createLinkingUserPromptEvents(ctx, agg, existingText, text, defaultText)...)
events = append(events, c.createLinkingUserDoneEvents(ctx, agg, existingText, text, defaultText)...)
events = append(events, c.createExternalUserNotFoundEvents(ctx, agg, existingText, text, defaultText)...)
events = append(events, c.createSuccessLoginEvents(ctx, agg, existingText, text, defaultText)...)
@@ -984,27 +983,6 @@ func (c *Commands) createRegistrationOrgEvents(ctx context.Context, agg *eventst
return events
}
func (c *Commands) createLinkingUserPromptEvents(ctx context.Context, agg *eventstore.Aggregate, existingText *CustomLoginTextReadModel, text *domain.CustomLoginText, defaultText bool) []eventstore.Command {
events := make([]eventstore.Command, 0)
event := c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyLinkingUserPromptTitle, existingText.LinkingUserPromptTitle, text.LinkingUserPrompt.Title, text.Language, defaultText)
if event != nil {
events = append(events, event)
}
event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyLinkingUserPromptDescription, existingText.LinkingUserPromptDescription, text.LinkingUserPrompt.Description, text.Language, defaultText)
if event != nil {
events = append(events, event)
}
event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyLinkingUserPromptLinkButtonText, existingText.LinkingUserPromptLinkButtonText, text.LinkingUserPrompt.LinkButtonText, text.Language, defaultText)
if event != nil {
events = append(events, event)
}
event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyLinkingUserPromptOtherButtonText, existingText.LinkingUserPromptOtherButtonText, text.LinkingUserPrompt.OtherButtonText, text.Language, defaultText)
if event != nil {
events = append(events, event)
}
return events
}
func (c *Commands) createLinkingUserDoneEvents(ctx context.Context, agg *eventstore.Aggregate, existingText *CustomLoginTextReadModel, text *domain.CustomLoginText, defaultText bool) []eventstore.Command {
events := make([]eventstore.Command, 0)
event := c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyLinkingUserDoneTitle, existingText.LinkingUserDoneTitle, text.LinkingUsersDone.Title, text.Language, defaultText)
@@ -422,10 +422,6 @@ func (wm *CustomLoginTextReadModel) Reduce() error {
wm.handleRegistrationOrgScreenSetEvent(e)
continue
}
if strings.HasPrefix(e.Key, domain.LoginKeyLinkingUserPrompt) {
wm.handleLinkingUserPromptScreenSetEvent(e)
continue
}
if strings.HasPrefix(e.Key, domain.LoginKeyLinkingUserDone) {
wm.handleLinkingUserDoneScreenSetEvent(e)
continue
@@ -566,10 +562,6 @@ func (wm *CustomLoginTextReadModel) Reduce() error {
wm.handleRegistrationOrgScreenRemoveEvent(e)
continue
}
if strings.HasPrefix(e.Key, domain.LoginKeyLinkingUserPrompt) {
wm.handleLinkingUserPromptRemoveEvent(e)
continue
}
if strings.HasPrefix(e.Key, domain.LoginKeyLinkingUserDone) {
wm.handleLinkingUserDoneRemoveEvent(e)
continue
@@ -2345,25 +2337,6 @@ func (wm *CustomLoginTextReadModel) handleRegistrationOrgScreenRemoveEvent(e *po
}
}
func (wm *CustomLoginTextReadModel) handleLinkingUserPromptScreenSetEvent(e *policy.CustomTextSetEvent) {
if e.Key == domain.LoginKeyLinkingUserPromptTitle {
wm.LinkingUserPromptTitle = e.Text
return
}
if e.Key == domain.LoginKeyLinkingUserPromptDescription {
wm.LinkingUserPromptDescription = e.Text
return
}
if e.Key == domain.LoginKeyLinkingUserPromptLinkButtonText {
wm.LinkingUserPromptLinkButtonText = e.Text
return
}
if e.Key == domain.LoginKeyLinkingUserPromptOtherButtonText {
wm.LinkingUserPromptOtherButtonText = e.Text
return
}
}
func (wm *CustomLoginTextReadModel) handleLinkingUserDoneScreenSetEvent(e *policy.CustomTextSetEvent) {
if e.Key == domain.LoginKeyLinkingUserDoneTitle {
wm.LinkingUserDoneTitle = e.Text
@@ -2383,25 +2356,6 @@ func (wm *CustomLoginTextReadModel) handleLinkingUserDoneScreenSetEvent(e *polic
}
}
func (wm *CustomLoginTextReadModel) handleLinkingUserPromptRemoveEvent(e *policy.CustomTextRemovedEvent) {
if e.Key == domain.LoginKeyLinkingUserPromptTitle {
wm.LinkingUserPromptTitle = ""
return
}
if e.Key == domain.LoginKeyLinkingUserPromptDescription {
wm.LinkingUserPromptDescription = ""
return
}
if e.Key == domain.LoginKeyLinkingUserPromptLinkButtonText {
wm.LinkingUserPromptLinkButtonText = ""
return
}
if e.Key == domain.LoginKeyLinkingUserPromptOtherButtonText {
wm.LinkingUserPromptOtherButtonText = ""
return
}
}
func (wm *CustomLoginTextReadModel) handleLinkingUserDoneRemoveEvent(e *policy.CustomTextRemovedEvent) {
if e.Key == domain.LoginKeyLinkingUserDoneTitle {
wm.LinkingUserDoneTitle = ""
@@ -678,18 +678,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) {
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English,
),
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptTitle, "Title", language.English,
),
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptDescription, "Description", language.English,
),
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptLinkButtonText, "LinkButtonText", language.English,
),
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptOtherButtonText, "OtherButtonText", language.English,
),
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserDoneTitle, "Title", language.English,
),
@@ -1024,12 +1012,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) {
PrivacyLinkText: "PrivacyLinkText",
SaveButtonText: "SaveButtonText",
},
LinkingUserPrompt: domain.LinkingUserPromptScreenText{
Title: "Title",
Description: "Description",
LinkButtonText: "LinkButtonText",
OtherButtonText: "OtherButtonText",
},
LinkingUsersDone: domain.LinkingUserDoneScreenText{
Title: "Title",
Description: "Description",
@@ -2260,30 +2242,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) {
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptTitle, "Title", language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptDescription, "Description", language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptLinkButtonText, "LinkButtonText", language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptOtherButtonText, "OtherButtonText", language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextSetEvent(context.Background(),
@@ -3021,18 +2979,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) {
instance.NewCustomTextRemovedEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, language.English,
),
instance.NewCustomTextRemovedEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptTitle, language.English,
),
instance.NewCustomTextRemovedEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptDescription, language.English,
),
instance.NewCustomTextRemovedEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptLinkButtonText, language.English,
),
instance.NewCustomTextRemovedEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptOtherButtonText, language.English,
),
instance.NewCustomTextRemovedEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserDoneTitle, language.English,
),
@@ -3141,7 +3087,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) {
RegistrationUser: domain.RegistrationUserScreenText{},
ExternalRegistrationUserOverview: domain.ExternalRegistrationUserOverviewScreenText{},
RegistrationOrg: domain.RegistrationOrgScreenText{},
LinkingUserPrompt: domain.LinkingUserPromptScreenText{},
LinkingUsersDone: domain.LinkingUserDoneScreenText{},
ExternalNotFound: domain.ExternalUserNotFoundScreenText{},
LoginSuccess: domain.SuccessLoginScreenText{},
@@ -4344,30 +4289,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) {
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptTitle, "Title", language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptDescription, "Description", language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptLinkButtonText, "LinkButtonText", language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptOtherButtonText, "OtherButtonText", language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextSetEvent(context.Background(),
@@ -5695,30 +5616,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) {
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextRemovedEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptTitle, language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextRemovedEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptDescription, language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextRemovedEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptLinkButtonText, language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextRemovedEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptOtherButtonText, language.English,
),
),
eventFromEventPusherWithInstanceID(
"INSTANCE",
instance.NewCustomTextRemovedEvent(context.Background(),
@@ -6456,18 +6353,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) {
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English,
),
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptTitle, "Title", language.English,
),
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptDescription, "Description", language.English,
),
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptLinkButtonText, "LinkButtonText", language.English,
),
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptOtherButtonText, "OtherButtonText", language.English,
),
instance.NewCustomTextSetEvent(context.Background(),
&instance.NewAggregate("INSTANCE").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserDoneTitle, "Title", language.English,
),
@@ -6802,12 +6687,6 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) {
PrivacyLinkText: "PrivacyLinkText",
SaveButtonText: "SaveButtonText",
},
LinkingUserPrompt: domain.LinkingUserPromptScreenText{
Title: "Title",
Description: "Description",
LinkButtonText: "LinkButtonText",
OtherButtonText: "OtherButtonText",
},
LinkingUsersDone: domain.LinkingUserDoneScreenText{
Title: "Title",
Description: "Description",
@@ -1087,26 +1087,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) {
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptTitle, "Title", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptDescription, "Description", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptLinkButtonText, "LinkButtonText", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptOtherButtonText, "OtherButtonText", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserDoneTitle, "Title", language.English,
@@ -1489,12 +1469,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) {
PrivacyLinkText: "PrivacyLinkText",
SaveButtonText: "SaveButtonText",
},
LinkingUserPrompt: domain.LinkingUserPromptScreenText{
Title: "Title",
Description: "Description",
LinkButtonText: "LinkButtonText",
OtherButtonText: "OtherButtonText",
},
LinkingUsersDone: domain.LinkingUserDoneScreenText{
Title: "Title",
Description: "Description",
@@ -2523,26 +2497,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) {
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptTitle, "Title", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptDescription, "Description", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptLinkButtonText, "LinkButtonText", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptOtherButtonText, "OtherButtonText", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserDoneTitle, "Title", language.English,
@@ -3253,18 +3207,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) {
org.NewCustomTextRemovedEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, language.English,
),
org.NewCustomTextRemovedEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptTitle, language.English,
),
org.NewCustomTextRemovedEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptDescription, language.English,
),
org.NewCustomTextRemovedEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptLinkButtonText, language.English,
),
org.NewCustomTextRemovedEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptOtherButtonText, language.English,
),
org.NewCustomTextRemovedEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserDoneTitle, language.English,
),
@@ -3374,7 +3316,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) {
ExternalRegistrationUserOverview: domain.ExternalRegistrationUserOverviewScreenText{},
RegistrationUser: domain.RegistrationUserScreenText{},
RegistrationOrg: domain.RegistrationOrgScreenText{},
LinkingUserPrompt: domain.LinkingUserPromptScreenText{},
LinkingUsersDone: domain.LinkingUserDoneScreenText{},
ExternalNotFound: domain.ExternalUserNotFoundScreenText{},
LoginSuccess: domain.SuccessLoginScreenText{},
@@ -4374,26 +4315,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) {
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptTitle, "Title", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptDescription, "Description", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptLinkButtonText, "LinkButtonText", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptOtherButtonText, "OtherButtonText", language.English,
),
),
eventFromEventPusher(
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserDoneTitle, "Title", language.English,
@@ -5494,26 +5415,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) {
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, language.English,
),
),
eventFromEventPusher(
org.NewCustomTextRemovedEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptTitle, language.English,
),
),
eventFromEventPusher(
org.NewCustomTextRemovedEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptDescription, language.English,
),
),
eventFromEventPusher(
org.NewCustomTextRemovedEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptLinkButtonText, language.English,
),
),
eventFromEventPusher(
org.NewCustomTextRemovedEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptOtherButtonText, language.English,
),
),
eventFromEventPusher(
org.NewCustomTextRemovedEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserDoneTitle, language.English,
@@ -6224,18 +6125,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) {
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgSaveButtonText, "SaveButtonText", language.English,
),
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptTitle, "Title", language.English,
),
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptDescription, "Description", language.English,
),
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptLinkButtonText, "LinkButtonText", language.English,
),
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserPromptOtherButtonText, "OtherButtonText", language.English,
),
org.NewCustomTextSetEvent(context.Background(),
&org.NewAggregate("org1").Aggregate, domain.LoginCustomText, domain.LoginKeyLinkingUserDoneTitle, "Title", language.English,
),
@@ -6570,12 +6459,6 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) {
PrivacyLinkText: "PrivacyLinkText",
SaveButtonText: "SaveButtonText",
},
LinkingUserPrompt: domain.LinkingUserPromptScreenText{
Title: "Title",
Description: "Description",
LinkButtonText: "LinkButtonText",
OtherButtonText: "OtherButtonText",
},
LinkingUsersDone: domain.LinkingUserDoneScreenText{
Title: "Title",
Description: "Description",
-14
View File
@@ -265,12 +265,6 @@ const (
LoginKeyRegisterOrgSaveButtonText = LoginKeyRegistrationOrg + "SaveButtonText"
LoginKeyRegisterOrgBackButtonText = LoginKeyRegistrationOrg + "BackButtonText"
LoginKeyLinkingUserPrompt = "LinkingUserPrompt."
LoginKeyLinkingUserPromptTitle = LoginKeyLinkingUserPrompt + "Title"
LoginKeyLinkingUserPromptDescription = LoginKeyLinkingUserPrompt + "Description"
LoginKeyLinkingUserPromptLinkButtonText = LoginKeyLinkingUserPrompt + "LinkButtonText"
LoginKeyLinkingUserPromptOtherButtonText = LoginKeyLinkingUserPrompt + "OtherButtonText"
LoginKeyLinkingUserDone = "LinkingUsersDone."
LoginKeyLinkingUserDoneTitle = LoginKeyLinkingUserDone + "Title"
LoginKeyLinkingUserDoneDescription = LoginKeyLinkingUserDone + "Description"
@@ -343,7 +337,6 @@ type CustomLoginText struct {
RegistrationUser RegistrationUserScreenText
ExternalRegistrationUserOverview ExternalRegistrationUserOverviewScreenText
RegistrationOrg RegistrationOrgScreenText
LinkingUserPrompt LinkingUserPromptScreenText
LinkingUsersDone LinkingUserDoneScreenText
ExternalNotFound ExternalUserNotFoundScreenText
LoginSuccess SuccessLoginScreenText
@@ -616,13 +609,6 @@ type RegistrationOrgScreenText struct {
SaveButtonText string
}
type LinkingUserPromptScreenText struct {
Title string
Description string
LinkButtonText string
OtherButtonText string
}
type LinkingUserDoneScreenText struct {
Title string
Description string
-18
View File
@@ -409,9 +409,6 @@ func CustomTextsToLoginDomain(instanceID, aggregateID, lang string, texts *Custo
if strings.HasPrefix(text.Key, domain.LoginKeyRegistrationOrg) {
registrationOrgKeyToDomain(text, result)
}
if strings.HasPrefix(text.Key, domain.LoginKeyLinkingUserPrompt) {
linkingUserPromptKeyToDomain(text, result)
}
if strings.HasPrefix(text.Key, domain.LoginKeyLinkingUserDone) {
linkingUserDoneKeyToDomain(text, result)
}
@@ -1106,21 +1103,6 @@ func registrationOrgKeyToDomain(text *CustomText, result *domain.CustomLoginText
}
}
func linkingUserPromptKeyToDomain(text *CustomText, result *domain.CustomLoginText) {
if text.Key == domain.LoginKeyLinkingUserPromptTitle {
result.LinkingUserPrompt.Title = text.Text
}
if text.Key == domain.LoginKeyLinkingUserPromptDescription {
result.LinkingUserPrompt.Description = text.Text
}
if text.Key == domain.LoginKeyLinkingUserPromptLinkButtonText {
result.LinkingUserPrompt.LinkButtonText = text.Text
}
if text.Key == domain.LoginKeyLinkingUserPromptOtherButtonText {
result.LinkingUserPrompt.OtherButtonText = text.Text
}
}
func linkingUserDoneKeyToDomain(text *CustomText, result *domain.CustomLoginText) {
if text.Key == domain.LoginKeyLinkingUserDoneTitle {
result.LinkingUsersDone.Title = text.Text
+2 -1
View File
@@ -7829,7 +7829,8 @@ message SetCustomLoginTextsRequest {
zitadel.text.v1.PasswordlessRegistrationScreenText passwordless_registration_text = 33;
zitadel.text.v1.PasswordlessRegistrationDoneScreenText passwordless_registration_done_text = 34;
zitadel.text.v1.ExternalRegistrationUserOverviewScreenText external_registration_user_overview_text = 35;
zitadel.text.v1.LinkingUserPromptScreenText linking_user_prompt_text = 36;
// Deprecated: the linking user prompt screen no longer exists
zitadel.text.v1.LinkingUserPromptScreenText linking_user_prompt_text = 36 [deprecated = true];
}
message SetCustomLoginTextsResponse {
+2 -1
View File
@@ -11299,7 +11299,8 @@ message SetCustomLoginTextsRequest {
zitadel.text.v1.PasswordlessRegistrationScreenText passwordless_registration_text = 33;
zitadel.text.v1.PasswordlessRegistrationDoneScreenText passwordless_registration_done_text = 34;
zitadel.text.v1.ExternalRegistrationUserOverviewScreenText external_registration_user_overview_text = 35;
zitadel.text.v1.LinkingUserPromptScreenText linking_user_prompt_text = 36;
// Deprecated: the linking user prompt screen no longer exists
zitadel.text.v1.LinkingUserPromptScreenText linking_user_prompt_text = 36 [deprecated = true];
}
message SetCustomLoginTextsResponse {
+2 -1
View File
@@ -92,7 +92,8 @@ message LoginCustomText {
PasswordlessRegistrationDoneScreenText passwordless_registration_done_text = 34;
ExternalRegistrationUserOverviewScreenText external_registration_user_overview_text = 35;
bool is_default = 36;
LinkingUserPromptScreenText linking_user_prompt_text = 37;
// Deprecated: the linking user prompt screen no longer exists
zitadel.text.v1.LinkingUserPromptScreenText linking_user_prompt_text = 37 [deprecated = true];
}
message SelectAccountScreenText {