mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-19 11:45:12 +00:00
feat: migrate unique constraints v1 to v2 (#1274)
* fix: unique migration * fix: unique migration * fix: remove migrations * fix: member events
This commit is contained in:
@@ -251,11 +251,21 @@ func (r *CommandSide) removeUserGrant(ctx context.Context, grantID, resourceOwne
|
||||
userGrantAgg := UserGrantAggregateFromWriteModel(&removeUserGrant.WriteModel)
|
||||
if !cascade {
|
||||
userGrantAgg.PushEvents(
|
||||
usergrant.NewUserGrantRemovedEvent(ctx, existingUserGrant.ResourceOwner, existingUserGrant.UserID, existingUserGrant.ProjectID),
|
||||
usergrant.NewUserGrantRemovedEvent(
|
||||
ctx,
|
||||
existingUserGrant.ResourceOwner,
|
||||
existingUserGrant.UserID,
|
||||
existingUserGrant.ProjectID,
|
||||
existingUserGrant.ProjectGrantID),
|
||||
)
|
||||
} else {
|
||||
userGrantAgg.PushEvents(
|
||||
usergrant.NewUserGrantCascadeRemovedEvent(ctx, existingUserGrant.ResourceOwner, existingUserGrant.UserID, existingUserGrant.ProjectID),
|
||||
usergrant.NewUserGrantCascadeRemovedEvent(
|
||||
ctx,
|
||||
existingUserGrant.ResourceOwner,
|
||||
existingUserGrant.UserID,
|
||||
existingUserGrant.ProjectID,
|
||||
existingUserGrant.ProjectGrantID),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user