Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-01-05 10:53:35 +01:00
parent a7a3025d25
commit ec1844d697
2 changed files with 8 additions and 9 deletions

View File

@@ -89,3 +89,11 @@ func (e *ErrSCIMUserAlreadyExists) Error() string {
func NewSCIMUserAlreadyExistsError(email string) *ErrSCIMUserAlreadyExists {
return &ErrSCIMUserAlreadyExists{Email: email}
}
type ErrUnsupportedFilter struct {
Reason string
}
func (e *ErrUnsupportedFilter) Error() string {
return fmt.Sprintf("unsupported filter: %s", e.Reason)
}

View File

@@ -27,15 +27,6 @@ type UserFilter struct {
UserName *string
}
// ErrUnsupportedFilter is returned when a SCIM filter uses unsupported operators or attributes
type ErrUnsupportedFilter struct {
Reason string
}
func (e *ErrUnsupportedFilter) Error() string {
return fmt.Sprintf("unsupported filter: %s", e.Reason)
}
// ParseUserFilter converts a SCIM filter AST expression to a UserFilter.
// Returns (nil, nil) if no filter is provided.
// Returns an error if the filter uses unsupported operators or attributes.