From 8fe635d3fd75bbdeefee3340fe33ce4d99fdf345 Mon Sep 17 00:00:00 2001 From: Fabi <38692350+fgerschwiler@users.noreply.github.com> Date: Fri, 9 Oct 2020 11:07:25 +0200 Subject: [PATCH] fix: delete external idps from users (#822) --- .../admin/repository/eventsourcing/eventstore/iam.go | 2 +- .../admin/repository/eventsourcing/handler/handler.go | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/internal/admin/repository/eventsourcing/eventstore/iam.go b/internal/admin/repository/eventsourcing/eventstore/iam.go index 54cfb4c5cd..c74c8ce8e9 100644 --- a/internal/admin/repository/eventsourcing/eventstore/iam.go +++ b/internal/admin/repository/eventsourcing/eventstore/iam.go @@ -163,7 +163,7 @@ func (repo *IAMRepository) SearchIDPConfigs(ctx context.Context, request *iam_mo result := &iam_model.IDPConfigSearchResponse{ Offset: request.Offset, Limit: request.Limit, - TotalResult: uint64(count), + TotalResult: count, Result: iam_es_model.IdpConfigViewsToModel(idps), } if err == nil { diff --git a/internal/admin/repository/eventsourcing/handler/handler.go b/internal/admin/repository/eventsourcing/handler/handler.go index 0507ac5962..2b77263ef4 100644 --- a/internal/admin/repository/eventsourcing/handler/handler.go +++ b/internal/admin/repository/eventsourcing/handler/handler.go @@ -35,11 +35,16 @@ type EventstoreRepos struct { func Register(configs Configs, bulkLimit, errorCount uint64, view *view.View, eventstore eventstore.Eventstore, repos EventstoreRepos, defaults systemdefaults.SystemDefaults) []query.Handler { return []query.Handler{ &Org{handler: handler{view, bulkLimit, configs.cycleDuration("Org"), errorCount}}, - &IamMember{handler: handler{view, bulkLimit, configs.cycleDuration("IamMember"), errorCount}, userEvents: repos.UserEvents}, + &IamMember{handler: handler{view, bulkLimit, configs.cycleDuration("IamMember"), errorCount}, + userEvents: repos.UserEvents}, &IDPConfig{handler: handler{view, bulkLimit, configs.cycleDuration("IDPConfig"), errorCount}}, &LoginPolicy{handler: handler{view, bulkLimit, configs.cycleDuration("LoginPolicy"), errorCount}}, - &IDPProvider{handler: handler{view, bulkLimit, configs.cycleDuration("LoginPolicy"), errorCount}, systemDefaults: defaults, iamEvents: repos.IamEvents, orgEvents: repos.OrgEvents}, - &User{handler: handler{view, bulkLimit, configs.cycleDuration("User"), errorCount}, eventstore: eventstore, orgEvents: repos.OrgEvents}, + &IDPProvider{handler: handler{view, bulkLimit, configs.cycleDuration("LoginPolicy"), errorCount}, + systemDefaults: defaults, iamEvents: repos.IamEvents, orgEvents: repos.OrgEvents}, + &User{handler: handler{view, bulkLimit, configs.cycleDuration("User"), errorCount}, + eventstore: eventstore, orgEvents: repos.OrgEvents}, + &ExternalIDP{handler: handler{view, bulkLimit, configs.cycleDuration("User"), errorCount}, + orgEvents: repos.OrgEvents, iamEvents: repos.IamEvents, systemDefaults: defaults}, } }