fix: keep user idp links (#7079)

* login

* auth methods

* NewIDPUserLinksActiveQuery

* use has_login_policy projection

* fix unit tests

* docs

* keep old user links projection

* fix tests

* cleanup

* cleanup comments

* test idp links are not removed

* idempotent auth method test

* idempotent auth method test
This commit is contained in:
Elio Bischof
2023-12-19 11:25:50 +01:00
committed by GitHub
parent 2c4e7070ea
commit c3e6257d68
24 changed files with 57 additions and 235 deletions

View File

@@ -163,7 +163,7 @@ func (c *Commands) RemoveDefaultIDPConfig(ctx context.Context, idpID string, idp
events = append(events, userEvents...)
}
orgAgg := OrgAggregateFromWriteModel(&NewOrgIdentityProviderWriteModel(idpProvider.AggregateID, idpID).WriteModel)
orgEvents := c.removeIDPFromLoginPolicy(ctx, orgAgg, idpID, true)
orgEvents := c.removeIDPFromLoginPolicy(ctx, orgAgg, idpID, true, externalIDPs...)
events = append(events, orgEvents...)
}