mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-07 04:40:05 -06:00
Merge pull request #7868 from dragonchaser/allow-spaces-in-filters
allow whitespaces in contains & startsWith Filter
This commit is contained in:
@@ -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 {
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user