feat: add terms on register and register org (#699)

* feat: add terms on register and register org

* feat: add terms on register and register org

* update form_submit.js to handle checkboxes correctly

* feat: free tier on org reg

Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
Fabi
2020-09-07 14:52:49 +02:00
committed by GitHub
co-authored by Livio Amstutz
parent cca92874ab
commit 4bc1eff373
16 changed files with 196 additions and 40 deletions
@@ -1,9 +1,8 @@
package handler
import (
"net/http"
auth_model "github.com/caos/zitadel/internal/auth/model"
"net/http"
"github.com/caos/zitadel/internal/auth_request/model"
caos_errs "github.com/caos/zitadel/internal/errors"
@@ -16,13 +15,14 @@ const (
)
type registerOrgFormData struct {
OrgName string `schema:"orgname"`
Email string `schema:"email"`
Username string `schema:"username"`
Firstname string `schema:"firstname"`
Lastname string `schema:"lastname"`
Password string `schema:"register-password"`
Password2 string `schema:"register-password-confirmation"`
OrgName string `schema:"orgname"`
Email string `schema:"email"`
Username string `schema:"username"`
Firstname string `schema:"firstname"`
Lastname string `schema:"lastname"`
Password string `schema:"register-password"`
Password2 string `schema:"register-password-confirmation"`
TermsConfirm bool `schema:"terms-confirm"`
}
type registerOrgData struct {
@@ -91,7 +91,6 @@ func (l *Login) renderRegisterOrg(w http.ResponseWriter, r *http.Request, authRe
baseData: l.getBaseData(r, authRequest, "Register", errType, errMessage),
registerOrgFormData: *formData,
}
pwPolicy, description, _ := l.getPasswordComplexityPolicy(r, "0")
if pwPolicy != nil {
data.PasswordPolicyDescription = description