Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: '/orgs/:org/repos' should also return private repos, which the caller has read access to #5310

Closed
1 task done
inxonic opened this issue Nov 9, 2018 · 0 comments · Fixed by #5383
Closed
1 task done
Labels
modifies/api This PR adds API routes or modifies them type/bug
Milestone

Comments

@inxonic
Copy link
Contributor

inxonic commented Nov 9, 2018

  • Gitea version (or commit ref): d487a76
  • Operating system: Linux
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (example below)

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 to all. 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"

@lafriks lafriks added the modifies/api This PR adds API routes or modifies them label Nov 10, 2018
@lunny lunny added the type/bug label Nov 11, 2018
inxonic added a commit to inxonic/gitea that referenced this issue Nov 22, 2018
techknowlogick pushed a commit that referenced this issue Nov 23, 2018
#3829) (#5383)

Signed-off-by: Daniel Balko <inxonic+github@gmail.com>
@lafriks lafriks added this to the 1.6.1 milestone Nov 23, 2018
inxonic added a commit to inxonic/gitea that referenced this issue Nov 23, 2018
…vate repos with read access (go-gitea#5310) (go-gitea#3829)

Signed-off-by: Daniel Balko <inxonic+github@gmail.com>
lafriks pushed a commit that referenced this issue Nov 24, 2018
…os with read access (#5310) (#3829) (#5393)

Signed-off-by: Daniel Balko <inxonic+github@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
modifies/api This PR adds API routes or modifies them type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants