mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-23 08:21:32 +00:00
only update wrong grants
This commit is contained in:
parent
b51e381149
commit
b77541998f
@ -601,6 +601,12 @@ func NewCond(name string, value interface{}) Condition {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NewUnequalCond(name string, value any) Condition {
|
||||||
|
return func(param string) (string, []any) {
|
||||||
|
return name + " <> " + param, []any{value}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func NewNamespacedCondition(name string, value interface{}) NamespacedCondition {
|
func NewNamespacedCondition(name string, value interface{}) NamespacedCondition {
|
||||||
return func(namespace string) Condition {
|
return func(namespace string) Condition {
|
||||||
return NewCond(namespace+"."+name, value)
|
return NewCond(namespace+"."+name, value)
|
||||||
|
@ -283,6 +283,7 @@ func (p *projectGrantProjection) reduceOwnerCorrected(event eventstore.Event) (*
|
|||||||
[]handler.Condition{
|
[]handler.Condition{
|
||||||
handler.NewCond(ProjectGrantColumnInstanceID, event.Aggregate().InstanceID),
|
handler.NewCond(ProjectGrantColumnInstanceID, event.Aggregate().InstanceID),
|
||||||
handler.NewCond(ProjectGrantColumnProjectID, event.Aggregate().ID),
|
handler.NewCond(ProjectGrantColumnProjectID, event.Aggregate().ID),
|
||||||
|
handler.NewUnequalCond(ProjectGrantColumnResourceOwner, event.Aggregate().ResourceOwner),
|
||||||
},
|
},
|
||||||
), nil
|
), nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user