1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Admins and user itself sees private org relations on profile

This commit is contained in:
ExMex
2016-02-07 10:20:58 +01:00
parent 894946c319
commit 2cfe6f8c60
3 changed files with 17 additions and 9 deletions

View File

@@ -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")