fix: reactivate/deactivate idp (#1351)

This commit is contained in:
Fabi 2021-02-26 15:48:14 +01:00 committed by GitHub
parent c8b9888427
commit 54f395e2e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -92,6 +92,10 @@ func (i *IDPConfig) processIDPConfig(event *es_models.Event) (err error) {
err = idp.AppendEvent(iam_model.IDPProviderTypeSystem, event)
case model.IDPConfigDeactivated,
model.IDPConfigReactivated:
err = idp.SetData(event)
if err != nil {
return err
}
idp, err = i.view.IDPConfigByID(idp.IDPConfigID)
if err != nil {
return err

View File

@ -97,6 +97,10 @@ func (i *IDPConfig) processIdpConfig(providerType iam_model.IDPProviderType, eve
err = idp.AppendEvent(providerType, event)
case model.IDPConfigDeactivated, iam_es_model.IDPConfigDeactivated,
model.IDPConfigReactivated, iam_es_model.IDPConfigReactivated:
err = idp.SetData(event)
if err != nil {
return err
}
idp, err = i.view.IDPConfigByID(idp.IDPConfigID)
if err != nil {
return err

View File

@ -97,6 +97,10 @@ func (m *IDPConfig) processIdpConfig(providerType iam_model.IDPProviderType, eve
err = idp.AppendEvent(providerType, event)
case model.IDPConfigDeactivated, iam_es_model.IDPConfigDeactivated,
model.IDPConfigReactivated, iam_es_model.IDPConfigReactivated:
err = idp.SetData(event)
if err != nil {
return err
}
idp, err = m.view.IDPConfigByID(idp.IDPConfigID)
if err != nil {
return err