From 66e639b5adc20e2ca6fad2496c8832331b7c935a Mon Sep 17 00:00:00 2001 From: Stefan Benz <46600784+stebenz@users.noreply.github.com> Date: Thu, 8 Jun 2023 16:08:13 +0200 Subject: [PATCH] fix: handling of org idp migrations and google events (#5992) --- internal/query/projection/idp_template.go | 12 ++++++++++++ internal/repository/instance/idp.go | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/internal/query/projection/idp_template.go b/internal/query/projection/idp_template.go index 80fee7e47..14a50c6a1 100644 --- a/internal/query/projection/idp_template.go +++ b/internal/query/projection/idp_template.go @@ -351,6 +351,10 @@ func (p *idpTemplateProjection) reducers() []handler.AggregateReducer { Event: instance.OIDCIDPMigratedAzureADEventType, Reduce: p.reduceOIDCIDPMigratedAzureAD, }, + { + Event: instance.OIDCIDPMigratedGoogleEventType, + Reduce: p.reduceOIDCIDPMigratedGoogle, + }, { Event: instance.JWTIDPAddedEventType, Reduce: p.reduceJWTIDPAdded, @@ -472,6 +476,14 @@ func (p *idpTemplateProjection) reducers() []handler.AggregateReducer { Event: org.OIDCIDPChangedEventType, Reduce: p.reduceOIDCIDPChanged, }, + { + Event: org.OIDCIDPMigratedAzureADEventType, + Reduce: p.reduceOIDCIDPMigratedAzureAD, + }, + { + Event: org.OIDCIDPMigratedGoogleEventType, + Reduce: p.reduceOIDCIDPMigratedGoogle, + }, { Event: org.JWTIDPAddedEventType, Reduce: p.reduceJWTIDPAdded, diff --git a/internal/repository/instance/idp.go b/internal/repository/instance/idp.go index b2d42d8ee..7e41c35a1 100644 --- a/internal/repository/instance/idp.go +++ b/internal/repository/instance/idp.go @@ -263,7 +263,7 @@ func NewOIDCIDPMigratedGoogleEvent( eventstore.NewBaseEventForPush( ctx, aggregate, - OIDCIDPMigratedAzureADEventType, + OIDCIDPMigratedGoogleEventType, ), id, name,