feat: register org process (#558)

* feat: register new organisation

* feat: create org request in management

* fix: tests

* Update internal/ui/login/static/i18n/en.yaml

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

* Update internal/ui/login/static/i18n/de.yaml

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

* Update internal/ui/login/static/templates/register_org.html

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

* Update internal/ui/login/handler/register_org_handler.go

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

* Update internal/ui/login/handler/register_org_handler.go

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

* fix: remove autocomplete

* fix: regenerate proto

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2020-08-06 14:38:19 +02:00
committed by GitHub
parent 41fa434439
commit f80367b49a
42 changed files with 15492 additions and 7875 deletions

View File

@@ -329,7 +329,7 @@ func TestRegisterUser(t *testing.T) {
{
name: "register user, ok",
args: args{
es: GetMockManipulateUserWithPasswordAndEmailCodeGen(ctrl, repo_model.User{Profile: &repo_model.Profile{UserName: "UserName", FirstName: "FirstName", LastName: "LastName"}, Email: &repo_model.Email{EmailAddress: "EmailAddress"}}),
es: GetMockManipulateUserWithPasswordInitCodeGen(ctrl, repo_model.User{Profile: &repo_model.Profile{UserName: "UserName", FirstName: "FirstName", LastName: "LastName"}, Email: &repo_model.Email{EmailAddress: "EmailAddress"}}),
ctx: authz.NewMockContext("orgID", "userID"),
user: &model.User{
ObjectRoot: es_models.ObjectRoot{Sequence: 1},
@@ -365,7 +365,7 @@ func TestRegisterUser(t *testing.T) {
{
name: "email as username",
args: args{
es: GetMockManipulateUserWithPasswordAndEmailCodeGen(ctrl, repo_model.User{Profile: &repo_model.Profile{UserName: "EmailAddress", FirstName: "FirstName", LastName: "LastName"}, Email: &repo_model.Email{EmailAddress: "EmailAddress"}}),
es: GetMockManipulateUserWithPasswordInitCodeGen(ctrl, repo_model.User{Profile: &repo_model.Profile{UserName: "EmailAddress", FirstName: "FirstName", LastName: "LastName"}, Email: &repo_model.Email{EmailAddress: "EmailAddress"}}),
ctx: authz.NewMockContext("orgID", "userID"),
user: &model.User{ObjectRoot: es_models.ObjectRoot{Sequence: 1},
Profile: &model.Profile{
@@ -875,7 +875,7 @@ func TestCreateInitCode(t *testing.T) {
{
name: "create init code",
args: args{
es: GetMockManipulateUserWithInitCodeGen(ctrl, repo_model.User{ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID", Sequence: 1}}),
es: GetMockManipulateUserWithPasswordInitCodeGen(ctrl, repo_model.User{ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID", Sequence: 1}}),
ctx: authz.NewMockContext("orgID", "userID"),
existing: &model.User{ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID", Sequence: 1}},
},