diff options
Diffstat (limited to 'routers/user/profile.go')
-rw-r--r-- | routers/user/profile.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/user/profile.go b/routers/user/profile.go index c1f68c03ee..46c2688d27 100644 --- a/routers/user/profile.go +++ b/routers/user/profile.go @@ -75,11 +75,12 @@ func Profile(ctx *middleware.Context) { ctx.Data["PageIsUserProfile"] = true ctx.Data["Owner"] = u - orgs, err := models.GetPublicOrgsByUserIDDesc(u.Id, "updated") + orgs, err := models.GetOrgsByUserIDDesc(u.Id, "updated", ctx.User.IsAdmin || ctx.User.Id == u.Id) if err != nil { - ctx.Handle(500, "GetPublicOrgsByUserIDDesc", err) + ctx.Handle(500, "GetOrgsByUserIDDesc", err) return } + ctx.Data["Orgs"] = orgs tab := ctx.Query("tab") |