mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:37: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:
@@ -53,6 +53,7 @@ func Test_customDomainPolicy(t *testing.T) {
|
||||
context.Background(),
|
||||
&org.NewAggregate("id", "ro").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
}, nil
|
||||
},
|
||||
@@ -64,6 +65,7 @@ func Test_customDomainPolicy(t *testing.T) {
|
||||
Events: []eventstore.Event{},
|
||||
},
|
||||
UserLoginMustBeDomain: true,
|
||||
ValidateOrgDomains: true,
|
||||
State: domain.PolicyStateActive,
|
||||
},
|
||||
wantErr: false,
|
||||
@@ -122,6 +124,7 @@ func Test_defaultDomainPolicy(t *testing.T) {
|
||||
context.Background(),
|
||||
&instance.NewAggregate("INSTANCE").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
}, nil
|
||||
},
|
||||
@@ -133,6 +136,7 @@ func Test_defaultDomainPolicy(t *testing.T) {
|
||||
Events: []eventstore.Event{},
|
||||
},
|
||||
UserLoginMustBeDomain: true,
|
||||
ValidateOrgDomains: true,
|
||||
State: domain.PolicyStateActive,
|
||||
},
|
||||
wantErr: false,
|
||||
@@ -181,6 +185,7 @@ func Test_DomainPolicy(t *testing.T) {
|
||||
context.Background(),
|
||||
&org.NewAggregate("id", "ro").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
}, nil
|
||||
},
|
||||
@@ -192,6 +197,7 @@ func Test_DomainPolicy(t *testing.T) {
|
||||
Events: []eventstore.Event{},
|
||||
},
|
||||
UserLoginMustBeDomain: true,
|
||||
ValidateOrgDomains: true,
|
||||
State: domain.PolicyStateActive,
|
||||
},
|
||||
wantErr: false,
|
||||
@@ -224,6 +230,7 @@ func Test_DomainPolicy(t *testing.T) {
|
||||
context.Background(),
|
||||
&instance.NewAggregate("INSTANCE").Aggregate,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
}, nil
|
||||
}).
|
||||
@@ -236,6 +243,7 @@ func Test_DomainPolicy(t *testing.T) {
|
||||
Events: []eventstore.Event{},
|
||||
},
|
||||
UserLoginMustBeDomain: true,
|
||||
ValidateOrgDomains: true,
|
||||
State: domain.PolicyStateActive,
|
||||
},
|
||||
wantErr: false,
|
||||
|
Reference in New Issue
Block a user