mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:27:31 +00:00
fix: case changes on org domain (#9196)
# Which Problems Are Solved
Organization name change results in domain events even if the domain
itself doesn't change.
# How the Problems Are Solved
Check if the domain itself really changes, and if not, don't create the
events.
# Additional Changes
Unittest for this specific case.
# Additional Context
None
(cherry picked from commit 69372e5209
)
This commit is contained in:

committed by
Livio Spring

parent
0c0babf010
commit
3159e38842
@@ -334,6 +334,10 @@ func (c *Commands) changeDefaultDomain(ctx context.Context, orgID, newName strin
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// rename of organization resulting in no change in the domain
|
||||
if newDefaultDomain == defaultDomain {
|
||||
return nil, nil
|
||||
}
|
||||
events := []eventstore.Command{
|
||||
org.NewDomainAddedEvent(ctx, orgAgg, newDefaultDomain),
|
||||
org.NewDomainVerifiedEvent(ctx, orgAgg, newDefaultDomain),
|
||||
|
Reference in New Issue
Block a user