fix: scim 2 filter: the username should be treated case-insensitive (#9257)

# Which Problems Are Solved
- when listing users via scim v2.0 filters applied to the username are
applied case-sensitive

# How the Problems Are Solved
- when a query filter is appleid on the username it is applied
case-insensitive

# Additional Context
Part of https://github.com/zitadel/zitadel/issues/8140
This commit is contained in:
Lars
2025-01-29 14:22:22 +01:00
committed by GitHub
parent b10428fb56
commit accfb7525a
5 changed files with 85 additions and 26 deletions

View File

@@ -905,6 +905,19 @@ func TestNewTextQuery(t *testing.T) {
Compare: TextNotEquals,
},
},
{
name: "not equal ignore case",
args: args{
column: testCol,
value: "h_urst%",
compare: TextNotEqualsIgnoreCase,
},
want: &textQuery{
Column: testCol,
Text: "h\\_urst\\%",
Compare: TextNotEqualsIgnoreCase,
},
},
{
name: "starts with",
args: args{
@@ -1194,6 +1207,28 @@ func TestTextQuery_comp(t *testing.T) {
query: sq.ILike{"test_table.test_col": "Hurst"},
},
},
{
name: "not equals",
fields: fields{
Column: testCol,
Text: "Hurst",
Compare: TextNotEquals,
},
want: want{
query: sq.NotEq{"test_table.test_col": "Hurst"},
},
},
{
name: "not equals ignore case",
fields: fields{
Column: testCol,
Text: "Hurst",
Compare: TextNotEqualsIgnoreCase,
},
want: want{
query: sq.NotILike{"test_table.test_col": "Hurst"},
},
},
{
name: "equals ignore case wildcard",
fields: fields{