diff --git a/modules/context/org.go b/modules/context/org.go
index 54cc3a9d8..11521c452 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
diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl
index 740929d46..e995db81d 100644
--- a/templates/user/dashboard/navbar.tmpl
+++ b/templates/user/dashboard/navbar.tmpl
@@ -61,7 +61,7 @@
{{.i18n.Tr "all"}}
- {{range .Org.Teams}}
+ {{range .OrgTeams}}
{{if not .IncludesAllRepositories}}
{{.Name}}
@@ -85,7 +85,7 @@
{{end}}
{{if not .UnitPullsGlobalDisabled}}
-
+
{{svg "octicon-git-pull-request"}} {{.i18n.Tr "pull_requests"}}
{{end}}