mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
fix: rename iam to instance (#3345)
* fix: rename iam command side to instance * fix: rename iam command side to instance * fix: rename iam command side to instance * fix: rename iam command side to instance * fix: rename orgiampolicy to domain policy * fix: merge conflicts * fix: protos * fix: md files * implement deprecated org iam policy again Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
"github.com/caos/zitadel/internal/eventstore/handler"
|
||||
"github.com/caos/zitadel/internal/eventstore/handler/crdb"
|
||||
"github.com/caos/zitadel/internal/repository/iam"
|
||||
"github.com/caos/zitadel/internal/repository/instance"
|
||||
"github.com/caos/zitadel/internal/repository/org"
|
||||
"github.com/caos/zitadel/internal/repository/policy"
|
||||
)
|
||||
@@ -82,14 +82,14 @@ func (p *PasswordComplexityProjection) reducers() []handler.AggregateReducer {
|
||||
},
|
||||
},
|
||||
{
|
||||
Aggregate: iam.AggregateType,
|
||||
Aggregate: instance.AggregateType,
|
||||
EventRedusers: []handler.EventReducer{
|
||||
{
|
||||
Event: iam.PasswordComplexityPolicyAddedEventType,
|
||||
Event: instance.PasswordComplexityPolicyAddedEventType,
|
||||
Reduce: p.reduceAdded,
|
||||
},
|
||||
{
|
||||
Event: iam.PasswordComplexityPolicyChangedEventType,
|
||||
Event: instance.PasswordComplexityPolicyChangedEventType,
|
||||
Reduce: p.reduceChanged,
|
||||
},
|
||||
},
|
||||
@@ -104,11 +104,11 @@ func (p *PasswordComplexityProjection) reduceAdded(event eventstore.Event) (*han
|
||||
case *org.PasswordComplexityPolicyAddedEvent:
|
||||
policyEvent = e.PasswordComplexityPolicyAddedEvent
|
||||
isDefault = false
|
||||
case *iam.PasswordComplexityPolicyAddedEvent:
|
||||
case *instance.PasswordComplexityPolicyAddedEvent:
|
||||
policyEvent = e.PasswordComplexityPolicyAddedEvent
|
||||
isDefault = true
|
||||
default:
|
||||
return nil, errors.ThrowInvalidArgumentf(nil, "PROJE-KTHmJ", "reduce.wrong.event.type %v", []eventstore.EventType{org.PasswordComplexityPolicyAddedEventType, iam.PasswordComplexityPolicyAddedEventType})
|
||||
return nil, errors.ThrowInvalidArgumentf(nil, "PROJE-KTHmJ", "reduce.wrong.event.type %v", []eventstore.EventType{org.PasswordComplexityPolicyAddedEventType, instance.PasswordComplexityPolicyAddedEventType})
|
||||
}
|
||||
return crdb.NewCreateStatement(
|
||||
&policyEvent,
|
||||
@@ -134,10 +134,10 @@ func (p *PasswordComplexityProjection) reduceChanged(event eventstore.Event) (*h
|
||||
switch e := event.(type) {
|
||||
case *org.PasswordComplexityPolicyChangedEvent:
|
||||
policyEvent = e.PasswordComplexityPolicyChangedEvent
|
||||
case *iam.PasswordComplexityPolicyChangedEvent:
|
||||
case *instance.PasswordComplexityPolicyChangedEvent:
|
||||
policyEvent = e.PasswordComplexityPolicyChangedEvent
|
||||
default:
|
||||
return nil, errors.ThrowInvalidArgumentf(nil, "PROJE-cf3Xb", "reduce.wrong.event.type %v", []eventstore.EventType{org.PasswordComplexityPolicyChangedEventType, iam.PasswordComplexityPolicyChangedEventType})
|
||||
return nil, errors.ThrowInvalidArgumentf(nil, "PROJE-cf3Xb", "reduce.wrong.event.type %v", []eventstore.EventType{org.PasswordComplexityPolicyChangedEventType, instance.PasswordComplexityPolicyChangedEventType})
|
||||
}
|
||||
cols := []handler.Column{
|
||||
handler.NewCol(ComplexityPolicyChangeDateCol, policyEvent.CreationDate()),
|
||||
|
Reference in New Issue
Block a user