mirror of
https://github.com/zitadel/zitadel.git
synced 2025-03-01 05:57:45 +00:00
fix(saml): correct handling of remove (#5606)
This commit is contained in:
parent
ea9223a2b0
commit
d981f0d348
@ -241,12 +241,11 @@ func (wm *SAMLEntityIDsWriteModel) Reduce() error {
|
|||||||
for _, event := range wm.Events {
|
for _, event := range wm.Events {
|
||||||
switch e := event.(type) {
|
switch e := event.(type) {
|
||||||
case *project.ApplicationRemovedEvent:
|
case *project.ApplicationRemovedEvent:
|
||||||
removeAppIDFromEntityIDs(wm.EntityIDs, e.AppID)
|
wm.EntityIDs = removeAppIDFromEntityIDs(wm.EntityIDs, e.AppID)
|
||||||
case *project.SAMLConfigAddedEvent:
|
case *project.SAMLConfigAddedEvent:
|
||||||
wm.EntityIDs = append(wm.EntityIDs, &AppIDToEntityID{AppID: e.AppID, EntityID: e.EntityID})
|
wm.EntityIDs = append(wm.EntityIDs, &AppIDToEntityID{AppID: e.AppID, EntityID: e.EntityID})
|
||||||
case *project.SAMLConfigChangedEvent:
|
case *project.SAMLConfigChangedEvent:
|
||||||
for i := range wm.EntityIDs {
|
for _, item := range wm.EntityIDs {
|
||||||
item := wm.EntityIDs[i]
|
|
||||||
if e.AppID == item.AppID && e.EntityID != "" {
|
if e.AppID == item.AppID && e.EntityID != "" {
|
||||||
item.EntityID = e.EntityID
|
item.EntityID = e.EntityID
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user