mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-05 22:52:46 +00:00
fix: dont overwrite resource owner in objectroot (#992)
* fix(management): search user grants with granted * fix(auth): handle user grant project owner * fix: grantowner to resourceowner * fix: generate mock * fix: mig * fix: query correct columns * fix: remove new line * fix: dont overwrite resourceowner on appendevent
This commit is contained in:
parent
9c603d9b38
commit
fcf81bed5f
@ -16,6 +16,9 @@ func (o *ObjectRoot) AppendEvent(event *Event) {
|
|||||||
if o.AggregateID == "" {
|
if o.AggregateID == "" {
|
||||||
o.AggregateID = event.AggregateID
|
o.AggregateID = event.AggregateID
|
||||||
}
|
}
|
||||||
|
if o.ResourceOwner == "" {
|
||||||
|
o.ResourceOwner = event.ResourceOwner
|
||||||
|
}
|
||||||
|
|
||||||
o.ChangeDate = event.CreationDate
|
o.ChangeDate = event.CreationDate
|
||||||
if event.PreviousSequence == 0 {
|
if event.PreviousSequence == 0 {
|
||||||
@ -23,7 +26,6 @@ func (o *ObjectRoot) AppendEvent(event *Event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
o.Sequence = event.Sequence
|
o.Sequence = event.Sequence
|
||||||
o.ResourceOwner = event.ResourceOwner
|
|
||||||
}
|
}
|
||||||
func (o *ObjectRoot) IsZero() bool {
|
func (o *ObjectRoot) IsZero() bool {
|
||||||
return o.AggregateID == ""
|
return o.AggregateID == ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user