zitadel/internal/repository/project/eventstore.go
Fabi 1143e3773e
fix: Remove user with cascading memberships (#1811)
* fix: remove usermemberships on user remove

* fix: text user remove with memberships

* fix: translations

* Update internal/iam/repository/eventsourcing/model/types.go

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

* fix: uncomment tests

* fix: remove memberships if user removed

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-06-07 07:20:47 +02:00

46 lines
3.1 KiB
Go

package project
import (
"github.com/caos/zitadel/internal/eventstore"
)
func RegisterEventMappers(es *eventstore.Eventstore) {
es.RegisterFilterEventMapper(ProjectAddedType, ProjectAddedEventMapper).
RegisterFilterEventMapper(ProjectChangedType, ProjectChangeEventMapper).
RegisterFilterEventMapper(ProjectDeactivatedType, ProjectDeactivatedEventMapper).
RegisterFilterEventMapper(ProjectReactivatedType, ProjectReactivatedEventMapper).
RegisterFilterEventMapper(ProjectRemovedType, ProjectRemovedEventMapper).
RegisterFilterEventMapper(MemberAddedType, MemberAddedEventMapper).
RegisterFilterEventMapper(MemberChangedType, MemberChangedEventMapper).
RegisterFilterEventMapper(MemberRemovedType, MemberRemovedEventMapper).
RegisterFilterEventMapper(MemberCascadeRemovedType, MemberCascadeRemovedEventMapper).
RegisterFilterEventMapper(RoleAddedType, RoleAddedEventMapper).
RegisterFilterEventMapper(RoleChangedType, RoleChangedEventMapper).
RegisterFilterEventMapper(RoleRemovedType, RoleRemovedEventMapper).
RegisterFilterEventMapper(GrantAddedType, GrantAddedEventMapper).
RegisterFilterEventMapper(GrantChangedType, GrantChangedEventMapper).
RegisterFilterEventMapper(GrantCascadeChangedType, GrantCascadeChangedEventMapper).
RegisterFilterEventMapper(GrantDeactivatedType, GrantDeactivateEventMapper).
RegisterFilterEventMapper(GrantReactivatedType, GrantReactivatedEventMapper).
RegisterFilterEventMapper(GrantRemovedType, GrantRemovedEventMapper).
RegisterFilterEventMapper(GrantMemberAddedType, GrantMemberAddedEventMapper).
RegisterFilterEventMapper(GrantMemberChangedType, GrantMemberChangedEventMapper).
RegisterFilterEventMapper(GrantMemberRemovedType, GrantMemberRemovedEventMapper).
RegisterFilterEventMapper(GrantMemberCascadeRemovedType, GrantMemberCascadeRemovedEventMapper).
RegisterFilterEventMapper(ApplicationAddedType, ApplicationAddedEventMapper).
RegisterFilterEventMapper(ApplicationChangedType, ApplicationChangedEventMapper).
RegisterFilterEventMapper(ApplicationRemovedType, ApplicationRemovedEventMapper).
RegisterFilterEventMapper(ApplicationDeactivatedType, ApplicationDeactivatedEventMapper).
RegisterFilterEventMapper(ApplicationReactivatedType, ApplicationReactivatedEventMapper).
RegisterFilterEventMapper(OIDCConfigAddedType, OIDCConfigAddedEventMapper).
RegisterFilterEventMapper(OIDCConfigChangedType, OIDCConfigChangedEventMapper).
RegisterFilterEventMapper(OIDCConfigSecretChangedType, OIDCConfigSecretChangedEventMapper).
RegisterFilterEventMapper(OIDCClientSecretCheckSucceededType, OIDCConfigSecretCheckSucceededEventMapper).
RegisterFilterEventMapper(OIDCClientSecretCheckFailedType, OIDCConfigSecretCheckFailedEventMapper).
RegisterFilterEventMapper(APIConfigAddedType, APIConfigAddedEventMapper).
RegisterFilterEventMapper(APIConfigChangedType, APIConfigChangedEventMapper).
RegisterFilterEventMapper(APIConfigSecretChangedType, APIConfigSecretChangedEventMapper).
RegisterFilterEventMapper(ApplicationKeyAddedEventType, ApplicationKeyAddedEventMapper).
RegisterFilterEventMapper(ApplicationKeyRemovedEventType, ApplicationKeyRemovedEventMapper)
}