Only show accessible teams in dashboard dropdown list (#19642)

Fixes #19637
This commit is contained in:
Jimmy Praet 2022-05-07 17:49:43 +02:00 committed by GitHub
parent 672e5a752d
commit 38d72d40f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View file

@ -72,12 +72,6 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
ctx.ContextUser = org.AsUser()
ctx.Data["Org"] = org
teams, err := org.LoadTeams()
if err != nil {
ctx.ServerError("LoadTeams", err)
}
ctx.Data["OrgTeams"] = teams
// Admin has super access.
if ctx.IsSigned && ctx.Doer.IsAdmin {
ctx.Org.IsOwner = true