-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Labels
Description
Environmental Information
- Onadata version: 5.0.3
Problem description
Endpoints that query the user model using the username are currently case sensitive.
Examples are as follows:
/api/v1/profiles/api/v1/projects/10574/share
Expected behavior
We should be able to query for usernames in a case-insensitive manner
Steps to reproduce the behavior
The following commands should yield the same result:
➜ curl 'scheme://api-domain/api/v1/profiles.json?users=fapiyo' \
-H 'accept: application/json' \
-H 'authorization: TempToken <Your temp token>'
➜ curl 'scheme://api-domain/api/v1/profiles.json?users=FApiyo' \
-H 'accept: application/json' \
-H 'authorization: TempToken <Your temp token>'➜ curl 'scheme://api-domain/api/v1/projects/<project-id>/share' \
-X 'PUT' \
-H 'accept: application/json' \
-H 'authorization: TempToken <Your temp token>' \
--data-raw 'username=fapiyo&role=readonly'
➜ curl 'scheme://api-domain/api/v1/projects/<project-id>/share' \
-X 'PUT' \
-H 'accept: application/json' \
-H 'authorization: TempToken <Your temp token>' \
--data-raw 'username=FApiyo&role=readonly'