mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
feat: validate org domains (#3387)
* feat: validate org domain command side * feat: validate org domain query side * fix: create domain policy * feat: add reading domain policy on addorg domain
This commit is contained in:
@@ -112,6 +112,7 @@ func TestCommandSide_AddHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&userAgg.Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -167,6 +168,7 @@ func TestCommandSide_AddHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&userAgg.Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -282,6 +284,7 @@ func TestCommandSide_AddHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&user.NewAggregate("user1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -398,6 +401,7 @@ func TestCommandSide_AddHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&userAgg.Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -493,6 +497,7 @@ func TestCommandSide_AddHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&userAgg.Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -575,6 +580,7 @@ func TestCommandSide_AddHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&userAgg.Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -793,6 +799,7 @@ func TestCommandSide_ImportHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&user.NewAggregate("user1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -828,6 +835,7 @@ func TestCommandSide_ImportHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&user.NewAggregate("user1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -869,6 +877,7 @@ func TestCommandSide_ImportHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&user.NewAggregate("user1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -957,6 +966,7 @@ func TestCommandSide_ImportHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&user.NewAggregate("user1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1039,6 +1049,7 @@ func TestCommandSide_ImportHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&user.NewAggregate("user1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1143,6 +1154,7 @@ func TestCommandSide_ImportHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&user.NewAggregate("user1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1251,6 +1263,7 @@ func TestCommandSide_ImportHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&user.NewAggregate("user1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1355,6 +1368,7 @@ func TestCommandSide_ImportHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&user.NewAggregate("user1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1556,6 +1570,7 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&org.NewAggregate("org1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1594,6 +1609,7 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&org.NewAggregate("org1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1640,6 +1656,7 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&org.NewAggregate("org1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1702,6 +1719,7 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&org.NewAggregate("org1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1764,6 +1782,7 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&org.NewAggregate("org1", "org1").Aggregate,
|
||||
false,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1843,6 +1862,7 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&org.NewAggregate("org1", "org1").Aggregate,
|
||||
false,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1980,6 +2000,7 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&org.NewAggregate("org1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -2085,6 +2106,7 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&user.NewAggregate("org1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -2184,6 +2206,7 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&org.NewAggregate("org1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -2305,6 +2328,7 @@ func TestCommandSide_RegisterHuman(t *testing.T) {
|
||||
org.NewDomainPolicyAddedEvent(context.Background(),
|
||||
&org.NewAggregate("org1", "org1").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -2875,6 +2899,7 @@ func TestAddHumanCommand(t *testing.T) {
|
||||
context.Background(),
|
||||
&org.NewAggregate("id", "ro").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
}, nil
|
||||
}).
|
||||
@@ -2917,6 +2942,7 @@ func TestAddHumanCommand(t *testing.T) {
|
||||
context.Background(),
|
||||
&org.NewAggregate("id", "ro").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
}, nil
|
||||
}).
|
||||
|
Reference in New Issue
Block a user