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

GET /api/v1/user/teams returns null #20829

Closed
Oliver-Hanikel opened this issue Aug 17, 2022 · 0 comments · Fixed by #20844
Closed

GET /api/v1/user/teams returns null #20829

Oliver-Hanikel opened this issue Aug 17, 2022 · 0 comments · Fixed by #20844
Labels

Comments

@Oliver-Hanikel
Copy link

Description

My user (20) is in an organization (publicorg) and in this organization in a team (Frontend). I would expect /api/v1/user/teams to return the team as described in the swagger, but instead it just returns null. It doesn't matter whether the user is a public member or not. Using this endpoint would simplify this pull request a bit.

Gitea Version

1.17.0 built with GNU Make 4.3, go1.18.4 : bindata, timetzdata, sqlite, sqlite_unlock_notify

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/Oliver-Hanikel/a279a0057dab0880a866b3180dd55ff2

Screenshots

image
image

Git Version

No response

Operating System

No response

How are you running Gitea?

I am using the official 1.17.0 docker image from docker hub.

Database

SQLite

Gusted pushed a commit to Gusted/gitea that referenced this issue Aug 18, 2022
- Currently the function takes in the `UserID` option, but isn't being
used within the SQL query. This patch fixes that by checking that only
teams are being returned that the user belongs to.
- Resolves go-gitea#20829
Gusted pushed a commit to Gusted/gitea that referenced this issue Aug 20, 2022
- Backport of go-gitea#20844
  - Currently the function takes in the UserID option, but isn't being used within the SQL query. This patch fixes that by checking that only teams are being returned that the user belongs to.
  - Resolves go-gitea#20829
zeripath pushed a commit that referenced this issue Aug 21, 2022
- Currently the function takes in the `UserID` option, but isn't being
used within the SQL query. This patch fixes that by checking that only
teams are being returned that the user belongs to.

Fix #20829

Co-authored-by: delvh <dev.lh@web.de>
zeripath pushed a commit that referenced this issue Aug 21, 2022
Backport #20844

Currently the function takes in the UserID option, but isn't being used within the SQL query. This patch fixes that by checking that only teams are being returned that the user belongs to.
 
Fix  #20829
vsysoev pushed a commit to IntegraSDL/gitea that referenced this issue Aug 28, 2022
- Currently the function takes in the `UserID` option, but isn't being
used within the SQL query. This patch fixes that by checking that only
teams are being returned that the user belongs to.

Fix go-gitea#20829

Co-authored-by: delvh <dev.lh@web.de>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant