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

404 for API request against /user/{username}/orgs #5485

Closed
2 of 7 tasks
ChriFo opened this issue Dec 6, 2018 · 3 comments
Closed
2 of 7 tasks

404 for API request against /user/{username}/orgs #5485

ChriFo opened this issue Dec 6, 2018 · 3 comments

Comments

@ChriFo
Copy link

ChriFo commented Dec 6, 2018

  • Gitea version (or commit ref): 328e38e built with: bindata, sqlite
  • Git version: 2.15.3
  • Operating system: Docker/Alpine
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

An GET request against https://try.gitea.io/api/v1/user/krischan157/orgs should return one organization called tree. But the response is an HTTP 404.

The GET request against https://try.gitea.io/api/v1/user/orgs is correctly returning the tree organization.

For both requests the user krischan157 was used for authorization.

@lunny
Copy link
Member

lunny commented Dec 8, 2018

You should visit https://try.gitea.io/api/v1/users/krischan157/orgs but not https://try.gitea.io/api/v1/user/krischan157/orgs

@lunny lunny closed this as completed Dec 8, 2018
@lunny lunny removed the type/bug label Dec 8, 2018
@ChriFo
Copy link
Author

ChriFo commented Dec 8, 2018

@lunny Thanks. You are right. But the request against https://try.gitea.io/api/v1/users/krischan157/orgs ist empty, too. Response code ist 200.

@lunny
Copy link
Member

lunny commented Dec 8, 2018

Because krischan157 is a private user of the org tree, so he's org will not be shown. And I have allowed admin to see that on PR #5494

@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
None yet
Projects
None yet
Development

No branches or pull requests

3 participants