diff options
author | Unknwon <u@gogs.io> | 2016-02-14 20:34:53 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-02-14 20:34:53 -0500 |
commit | d8631b616e41a0dc05db7982bf6b5a569307f622 (patch) | |
tree | 3e4a05a4a09194ca73e4e3e3597bebe05d9a0875 /routers/user | |
parent | aa5e837c65aa8d9c162e829a46718d7f7129ef6a (diff) | |
parent | 40f9d4f920c481db8dc8bf1a5b29c7005ea06f29 (diff) | |
download | gitea-d8631b616e41a0dc05db7982bf6b5a569307f622.tar.gz gitea-d8631b616e41a0dc05db7982bf6b5a569307f622.zip |
Merge pull request #2578 from exmex/develop
Admins and user itself sees private org relations on profile
Diffstat (limited to 'routers/user')
-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") |