mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-02 08:58:52 +00:00
New eventstore policies (#1084)
* feat: login policy * feat: password complexity policy * feat: org iam policy * feat: label policy * feat: add and change policies * feat: second factors * feat: second and multi factors * feat: better naming * feat: better naming
This commit is contained in:
@@ -1882,7 +1882,7 @@ func TestChangeIdpConfiguration(t *testing.T) {
|
||||
t.Errorf("result has no id")
|
||||
}
|
||||
if result.IDPConfigID != tt.res.result.IDPConfigID {
|
||||
t.Errorf("got wrong result IdpConfigID: expected: %v, actual: %v ", tt.res.result.IDPConfigID, result.IDPConfigID)
|
||||
t.Errorf("got wrong result IDPConfigID: expected: %v, actual: %v ", tt.res.result.IDPConfigID, result.IDPConfigID)
|
||||
}
|
||||
if result.Name != tt.res.result.Name {
|
||||
t.Errorf("got wrong result name: expected: %v, actual: %v ", tt.res.result.Name, result.Name)
|
||||
@@ -2569,12 +2569,12 @@ func TestAddIdpProviderToLoginPolicy(t *testing.T) {
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
provider: &iam_model.IDPProvider{
|
||||
ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID", Sequence: 0},
|
||||
IdpConfigID: "IdpConfigID2",
|
||||
IDPConfigID: "IdpConfigID2",
|
||||
Type: iam_model.IDPProviderTypeSystem,
|
||||
},
|
||||
},
|
||||
res: res{
|
||||
result: &iam_model.IDPProvider{IdpConfigID: "IdpConfigID2"},
|
||||
result: &iam_model.IDPProvider{IDPConfigID: "IdpConfigID2"},
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -2584,7 +2584,7 @@ func TestAddIdpProviderToLoginPolicy(t *testing.T) {
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
provider: &iam_model.IDPProvider{
|
||||
ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID", Sequence: 0},
|
||||
IdpConfigID: "IDPConfigID",
|
||||
IDPConfigID: "IDPConfigID",
|
||||
Type: iam_model.IDPProviderTypeSystem,
|
||||
},
|
||||
},
|
||||
@@ -2614,7 +2614,7 @@ func TestAddIdpProviderToLoginPolicy(t *testing.T) {
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
provider: &iam_model.IDPProvider{
|
||||
ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID", Sequence: 0},
|
||||
IdpConfigID: "IdpConfigID2",
|
||||
IDPConfigID: "IdpConfigID2",
|
||||
},
|
||||
},
|
||||
res: res{
|
||||
@@ -2633,8 +2633,8 @@ func TestAddIdpProviderToLoginPolicy(t *testing.T) {
|
||||
if tt.res.wantErr && tt.res.errFunc(err) {
|
||||
return
|
||||
}
|
||||
if result.IdpConfigID != tt.res.result.IdpConfigID {
|
||||
t.Errorf("got wrong result IDPConfigID: expected: %v, actual: %v ", tt.res.result.IdpConfigID, result.IdpConfigID)
|
||||
if result.IDPConfigID != tt.res.result.IDPConfigID {
|
||||
t.Errorf("got wrong result IDPConfigID: expected: %v, actual: %v ", tt.res.result.IDPConfigID, result.IDPConfigID)
|
||||
}
|
||||
if result.Type != tt.res.result.Type {
|
||||
t.Errorf("got wrong result Type: expected: %v, actual: %v ", tt.res.result.Type, result.Type)
|
||||
@@ -2666,7 +2666,7 @@ func TestRemoveIdpProviderFromLoginPolicy(t *testing.T) {
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
provider: &iam_model.IDPProvider{
|
||||
ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID", Sequence: 0},
|
||||
IdpConfigID: "IDPConfigID",
|
||||
IDPConfigID: "IDPConfigID",
|
||||
Type: iam_model.IDPProviderTypeSystem,
|
||||
},
|
||||
},
|
||||
@@ -2679,7 +2679,7 @@ func TestRemoveIdpProviderFromLoginPolicy(t *testing.T) {
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
provider: &iam_model.IDPProvider{
|
||||
ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID", Sequence: 0},
|
||||
IdpConfigID: "IdpConfigID2",
|
||||
IDPConfigID: "IdpConfigID2",
|
||||
Type: iam_model.IDPProviderTypeSystem,
|
||||
},
|
||||
},
|
||||
@@ -2709,7 +2709,7 @@ func TestRemoveIdpProviderFromLoginPolicy(t *testing.T) {
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
provider: &iam_model.IDPProvider{
|
||||
ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID", Sequence: 0},
|
||||
IdpConfigID: "IdpConfigID2",
|
||||
IDPConfigID: "IdpConfigID2",
|
||||
},
|
||||
},
|
||||
res: res{
|
||||
|
||||
Reference in New Issue
Block a user