-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix SQL Query for SearchTeam
#20844
Fix SQL Query for SearchTeam
#20844
Conversation
- 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
Co-authored-by: delvh <dev.lh@web.de>
And some unit tests seem to need an edit… |
Thanks for fixing this bug |
@delvh @lunny Please re-review again. Especially regarding this line: https://github.com/go-gitea/gitea/pull/20844/files#diff-3d84110fa93e421c3875fcd87a4732305131fc42b65d34d06a1b8e453bee3d80L342 This function is already specified to require organization admin in the router, so no need to specify only the teams that the user belong in |
Co-authored-by: delvh <dev.lh@web.de>
- 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
make lgtm work |
* giteaofficial/main: update current stable version [skip ci] Updated translations via Crowdin Fix mirror address setting not working (go-gitea#20850) Support Proxy protocol (go-gitea#12527) Fix SQL Query for `SearchTeam` (go-gitea#20844) Double check CloneURL is acceptable (go-gitea#20869) Fix graceful doc (go-gitea#20883) Pad GPG Key ID with preceding zeroes (go-gitea#20878) [skip ci] Updated translations via Crowdin call builtinUnused() if internal SSH is disabled (go-gitea#20877) Don't open new page for ext wiki on same repository (go-gitea#20725) [skip ci] Updated translations via Crowdin Fix the mode of custom dir to 0700 in docker-rootless (go-gitea#20861) Fix UI mis-align for PR commit history (go-gitea#20845)
- 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>
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.