mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
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:
@@ -288,6 +288,7 @@ func NewTextQuery(col Column, value string, compare TextComparison) (*textQuery,
|
||||
// handle the comparisons which use (i)like and therefore need to escape potential wildcards in the value
|
||||
switch compare {
|
||||
case TextEqualsIgnoreCase,
|
||||
TextNotEqualsIgnoreCase,
|
||||
TextStartsWith,
|
||||
TextStartsWithIgnoreCase,
|
||||
TextEndsWith,
|
||||
@@ -334,6 +335,8 @@ func (q *textQuery) comp() sq.Sqlizer {
|
||||
return sq.NotEq{q.Column.identifier(): q.Text}
|
||||
case TextEqualsIgnoreCase:
|
||||
return sq.ILike{q.Column.identifier(): q.Text}
|
||||
case TextNotEqualsIgnoreCase:
|
||||
return sq.NotILike{q.Column.identifier(): q.Text}
|
||||
case TextStartsWith:
|
||||
return sq.Like{q.Column.identifier(): q.Text + "%"}
|
||||
case TextStartsWithIgnoreCase:
|
||||
@@ -368,6 +371,7 @@ const (
|
||||
TextContainsIgnoreCase
|
||||
TextListContains
|
||||
TextNotEquals
|
||||
TextNotEqualsIgnoreCase
|
||||
|
||||
textCompareMax
|
||||
)
|
||||
|
Reference in New Issue
Block a user