From 9f14fe43c6de96ce7cf81c87620fcd50e086910c Mon Sep 17 00:00:00 2001 From: Gusted Date: Sat, 20 Nov 2021 03:13:24 +0000 Subject: Fix correct usage of teams (#17732) - `.Teams` isn't a field on the User type, thus using the seperate loaded teams. - Add a space between `PathEscape` and argument. Co-authored-by: Lunny Xiao --- modules/context/org.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/context') diff --git a/modules/context/org.go b/modules/context/org.go index 54cc3a9d8c..11521c452b 100644 --- a/modules/context/org.go +++ b/modules/context/org.go @@ -69,6 +69,12 @@ func HandleOrgAssignment(ctx *Context, args ...bool) { org := ctx.Org.Organization 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.User.IsAdmin { ctx.Org.IsOwner = true -- cgit v1.2.3