mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-07 14:52:15 +00:00
fix: hide / show username suffix correctly on registration pages (#4097)
This commit is contained in:
@@ -37,6 +37,7 @@ type registerData struct {
|
||||
HasNumber string
|
||||
HasSymbol string
|
||||
ShowUsername bool
|
||||
ShowUsernameSuffix bool
|
||||
OrgRegister bool
|
||||
}
|
||||
|
||||
@@ -149,6 +150,13 @@ func (l *Login) renderRegister(w http.ResponseWriter, r *http.Request, authReque
|
||||
data.ShowUsername = orgIAMPolicy.UserLoginMustBeDomain
|
||||
data.OrgRegister = orgIAMPolicy.UserLoginMustBeDomain
|
||||
|
||||
labelPolicy, err := l.getLabelPolicy(r, resourceOwner)
|
||||
if err != nil {
|
||||
l.renderRegister(w, r, authRequest, formData, err)
|
||||
return
|
||||
}
|
||||
data.ShowUsernameSuffix = !labelPolicy.HideLoginNameSuffix
|
||||
|
||||
funcs := map[string]interface{}{
|
||||
"selectedLanguage": func(l string) bool {
|
||||
if formData == nil {
|
||||
|
||||
Reference in New Issue
Block a user