API: '/orgs/:org/repos' should also return private repos, which the caller has read access to #5310
Closed
1 task done
Labels
Milestone
Description
API
/orgs/:org/repos
only returns public repos of an org (if not called as admin). I'd expect it to also return private repos, which the caller has at least read access to.This would be more consistent with the web interface and the Github API where
type
defaults toall
. Further there's no other API call for that purpose.Example
Only returns
testcase01/public-repo
:curl -X GET "https://try.gitea.io/api/v1/orgs/testcase01/repos" -H "accept: application/json" -H "authorization: Basic dGVzdHVzZXIwMjp0ZXN0dXNlcjAy"
Should also return
testcase01/private-repo
as it is readable:curl -X GET "https://try.gitea.io/api/v1/repos/testcase01/private-repo" -H "accept: application/json" -H "authorization: Basic dGVzdHVzZXIwMjp0ZXN0dXNlcjAy"
Web interface also returns both repos:
curl -X GET https://try.gitea.io/testcase01 -H "accept: application/json" -H "authorization: Basic dGVzdHVzZXIwMjp0ZXN0dXNlcjAy"
The text was updated successfully, but these errors were encountered: