Skip to content

Conversation

jpraet
Copy link
Member

@jpraet jpraet commented May 6, 2022

Fixes #19637

Use the "Teams" variable as set in

ctx.Data["Teams"] = ctx.Org.Teams

which is filtered to those teams the current user has access too here:

if shouldSeeAllTeams {
ctx.Org.Teams, err = org.LoadTeams()
if err != nil {
ctx.ServerError("LoadTeams", err)
return
}
} else {
ctx.Org.Teams, err = org.GetUserTeams(ctx.Doer.ID)
if err != nil {
ctx.ServerError("GetUserTeams", err)
return
}
}

@lunny lunny added this to the 1.17.0 milestone May 7, 2022
@lunny lunny added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label May 7, 2022
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label May 7, 2022
@codecov-commenter
Copy link

codecov-commenter commented May 7, 2022

Codecov Report

❗ No coverage uploaded for pull request base (main@0eac09e). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main   #19642   +/-   ##
=======================================
  Coverage        ?   47.35%           
=======================================
  Files           ?      954           
  Lines           ?   132722           
  Branches        ?        0           
=======================================
  Hits            ?    62851           
  Misses          ?    62293           
  Partials        ?     7578           
Impacted Files Coverage Δ
modules/context/org.go 51.70% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0eac09e...9001ed8. Read the comment docs.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 7, 2022
@6543
Copy link
Member

6543 commented May 7, 2022

👋 🤖

@6543 6543 merged commit 38d72d4 into go-gitea:main May 7, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 8, 2022
* giteaofficial/main:
  Delete related PullAutoMerge and ReviewState on User/Repo Deletion (go-gitea#19649)
  Allow custom default merge message with .gitea/default_merge_message/<merge_style>_TEMPLATE.md (go-gitea#18177)
  Allow to mark files in a PR as viewed (go-gitea#19007)
  Auto merge pull requests when all checks succeeded via API (go-gitea#9307)
  Hide private repositories in packages (go-gitea#19584)
  Only show accessible teams in dashboard dropdown list (go-gitea#19642)
  prevent double click new issue/pull/comment button (go-gitea#16157)
  Improve reviewing PR UX (go-gitea#19612)
  [skip ci] Updated translations via Crowdin
  Add Changelog v1.16.7 (go-gitea#19575) (go-gitea#19644)
  Set safe dir for git operations in .drone.yml CI (go-gitea#19641)
  Add missing `sorting` column in `project_issue` table (go-gitea#19635)
@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
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Teams dropdown also shows teams you are not a member of
8 participants