fix: correct event type for permission removed (#9626)

# Which Problems Are Solved

When we recently changed some permission for the `SYSTEM_OWNER` role on
QA, we noticed that there we multiple `permission.added` even when we
removed specific permissions.

# How the Problems Are Solved

Fixed the event type when removing permissions.

# Additional Changes

None

# Additional Context

Noticed when rolling out some changes on QA

(cherry picked from commit e7c7f9b800)
This commit is contained in:
Livio Spring
2025-03-24 18:00:44 +01:00
parent ee479fbfd9
commit 839db8ce35

View File

@@ -99,7 +99,7 @@ func (e *RemovedEvent) Fields() []*eventstore.FieldOperation {
func NewRemovedEvent(ctx context.Context, aggregate *eventstore.Aggregate, role, permission string) *RemovedEvent {
return &RemovedEvent{
BaseEvent: eventstore.NewBaseEventForPush(ctx, aggregate, AddedType),
BaseEvent: eventstore.NewBaseEventForPush(ctx, aggregate, RemovedType),
Role: role,
Permission: permission,
}