fix: list IDPs on Org (#3141)

* fix: idp query

* fix: remove failed events
This commit is contained in:
Livio Amstutz
2022-02-01 08:32:59 +01:00
committed by GitHub
parent 694af4bebc
commit bf6cb59b87
3 changed files with 15 additions and 8 deletions

View File

@@ -7,11 +7,12 @@ import (
"time"
sq "github.com/Masterminds/squirrel"
"github.com/lib/pq"
"github.com/caos/zitadel/internal/crypto"
"github.com/caos/zitadel/internal/domain"
"github.com/caos/zitadel/internal/errors"
"github.com/caos/zitadel/internal/query/projection"
"github.com/lib/pq"
)
type IDP struct {
@@ -239,6 +240,14 @@ func NewIDPResourceOwnerSearchQuery(value string) (SearchQuery, error) {
return NewTextQuery(IDPResourceOwnerCol, value, TextEquals)
}
func NewIDPResourceOwnerListSearchQuery(ids ...string) (SearchQuery, error) {
list := make([]interface{}, len(ids))
for i, value := range ids {
list[i] = value
}
return NewListQuery(IDPResourceOwnerCol, list, ListIn)
}
func (q *IDPSearchQueries) toQuery(query sq.SelectBuilder) sq.SelectBuilder {
query = q.SearchRequest.toQuery(query)
for _, q := range q.Queries {