mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 12:27:59 +00:00
5bd9badbcf
* fix: filter granted memberships correctly * fix: only show changes of granted project * Apply suggestions from code review Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> * Update internal/query/user_membership.go Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com>
50 lines
1.1 KiB
Go
50 lines
1.1 KiB
Go
package management
|
|
|
|
import (
|
|
"github.com/zitadel/zitadel/internal/api/grpc/server/middleware"
|
|
"github.com/zitadel/zitadel/pkg/grpc/change"
|
|
)
|
|
|
|
func (c *ListUserChangesResponse) Localizers() []middleware.Localizer {
|
|
if c == nil {
|
|
return nil
|
|
}
|
|
return changesLocalizers(c.Result)
|
|
}
|
|
|
|
func (c *ListOrgChangesResponse) Localizers() []middleware.Localizer {
|
|
if c == nil {
|
|
return nil
|
|
}
|
|
return changesLocalizers(c.Result)
|
|
}
|
|
|
|
func (c *ListProjectChangesResponse) Localizers() []middleware.Localizer {
|
|
if c == nil {
|
|
return nil
|
|
}
|
|
return changesLocalizers(c.Result)
|
|
}
|
|
|
|
func (c *ListProjectGrantChangesResponse) Localizers() []middleware.Localizer {
|
|
if c == nil {
|
|
return nil
|
|
}
|
|
return changesLocalizers(c.Result)
|
|
}
|
|
|
|
func (c *ListAppChangesResponse) Localizers() []middleware.Localizer {
|
|
if c == nil {
|
|
return nil
|
|
}
|
|
return changesLocalizers(c.Result)
|
|
}
|
|
|
|
func changesLocalizers(changes []*change.Change) []middleware.Localizer {
|
|
localizers := make([]middleware.Localizer, len(changes))
|
|
for i, change := range changes {
|
|
localizers[i] = change.EventType
|
|
}
|
|
return localizers
|
|
}
|