API doesn't show private user repos for non admins and non owner users having read access #8619
Closed
2 of 7 tasks
Labels
modifies/api
This PR adds API routes or modifies them
type/feature
Completely new functionality. Can only be merged if feature freeze is not active.
[x]
):Description
The API only returns private repos if you are the owner or administrator regardless if you have read access. This issue occurred a while ago with organizations too, but this was fixed. The problem remains for private user repos.
##Example:
How to reproduce:
while beeing logged in as User B
Expected: Show private repo of User A because User B has read access
User B request via token:
curl -X GET "https://try.gitea.io/api/v1/users/userA_api_bug/repos" -H "accept: application/json" -H "authorization: token c96aed5997df331c976fc935e49cede48a96ff9f"
Expected same output as with user A via token:
curl -s -X GET "https://try.gitea.io/api/v1/users/userA_api_bug/repos" -H "accept: application/json" -H "authorization: token d459b6f9ceffa93af7a8cdfb36e82fe3d8f68b94"
The text was updated successfully, but these errors were encountered: