summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorExMex <great.mafia2010@gmail.com>2016-02-07 10:20:58 +0100
committerExMex <great.mafia2010@gmail.com>2016-02-07 10:20:58 +0100
commit2cfe6f8c60033989fa141b415080fc4416f03c5b (patch)
treebbac3cd975435202015e87631c60b4bb78047925 /routers
parent894946c319aa0e961388227c7cff11b1392edfc7 (diff)
downloadgitea-2cfe6f8c60033989fa141b415080fc4416f03c5b.tar.gz
gitea-2cfe6f8c60033989fa141b415080fc4416f03c5b.zip
Admins and user itself sees private org relations on profile
Diffstat (limited to 'routers')
-rw-r--r--routers/user/profile.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/user/profile.go b/routers/user/profile.go
index 0a876610ed..c18a104be9 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")