Skip to content

Commit

Permalink
allow whitespaces in contains & startsWith Filter
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Richter <[email protected]>
  • Loading branch information
dragonchaser authored and 2403905 committed Jan 24, 2024
1 parent 66fe124 commit 9f4c820
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/graph/pkg/service/v0/users_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (g Graph) applyFilterFunctionStartsWith(ctx context.Context, req *godata.Go
switch operand1.Token.Value {
case "displayName":
var retUsers []*libregraph.User
filterValue := operand2.Token.Value
filterValue := strings.Trim(operand2.Token.Value, "'")
logger.Debug().Str("property", operand2.Token.Value).Str("value", filterValue).Msg("Filtering displayName by startsWith")
if users, err := g.identityBackend.GetUsers(ctx, req); err == nil {
for _, user := range users {
Expand All @@ -99,7 +99,7 @@ func (g Graph) applyFilterFunctionContains(ctx context.Context, req *godata.GoDa
switch operand1.Token.Value {
case "displayName":
var retUsers []*libregraph.User
filterValue := operand2.Token.Value
filterValue := strings.Trim(operand2.Token.Value, "'")
logger.Debug().Str("property", operand2.Token.Value).Str("value", filterValue).Msg("Filtering displayName by contains")
if users, err := g.identityBackend.GetUsers(ctx, req); err == nil {
for _, user := range users {
Expand Down

0 comments on commit 9f4c820

Please sign in to comment.