fix: org name overwrite (#1133)

* fix: org name overwrite

* import
This commit is contained in:
Livio Amstutz 2020-12-22 12:12:05 +01:00 committed by GitHub
parent 273b7487b3
commit f96838cf62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

View File

@ -1,9 +1,9 @@
package handler package handler
import ( import (
auth_model "github.com/caos/zitadel/internal/auth/model"
"net/http" "net/http"
auth_model "github.com/caos/zitadel/internal/auth/model"
"github.com/caos/zitadel/internal/auth_request/model" "github.com/caos/zitadel/internal/auth_request/model"
caos_errs "github.com/caos/zitadel/internal/errors" caos_errs "github.com/caos/zitadel/internal/errors"
org_model "github.com/caos/zitadel/internal/org/model" org_model "github.com/caos/zitadel/internal/org/model"
@ -15,14 +15,14 @@ const (
) )
type registerOrgFormData struct { type registerOrgFormData struct {
OrgName string `schema:"orgname"` RegisterOrgName string `schema:"orgname"`
Email string `schema:"email"` Email string `schema:"email"`
Username string `schema:"username"` Username string `schema:"username"`
Firstname string `schema:"firstname"` Firstname string `schema:"firstname"`
Lastname string `schema:"lastname"` Lastname string `schema:"lastname"`
Password string `schema:"register-password"` Password string `schema:"register-password"`
Password2 string `schema:"register-password-confirmation"` Password2 string `schema:"register-password-confirmation"`
TermsConfirm bool `schema:"terms-confirm"` TermsConfirm bool `schema:"terms-confirm"`
} }
type registerOrgData struct { type registerOrgData struct {
@ -140,6 +140,6 @@ func (d registerOrgFormData) toUserModel() *usr_model.User {
func (d registerOrgFormData) toOrgModel() *org_model.Org { func (d registerOrgFormData) toOrgModel() *org_model.Org {
return &org_model.Org{ return &org_model.Org{
Name: d.OrgName, Name: d.RegisterOrgName,
} }
} }

View File

@ -15,7 +15,7 @@
<div class="fields"> <div class="fields">
<div class="field"> <div class="field">
<label class="label" for="orgname">{{t "RegistrationOrg.OrgName"}}</label> <label class="label" for="orgname">{{t "RegistrationOrg.OrgName"}}</label>
<input class="input" type="text" id="orgname" name="orgname" value="{{ .OrgName }}" autofocus required> <input class="input" type="text" id="orgname" name="orgname" value="{{ .RegisterOrgName }}" autofocus required>
</div> </div>
{{if .UserLoginMustBeDomain}} {{if .UserLoginMustBeDomain}}