mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-24 09:59:24 +02:00
Admins and user itself sees private org relations on profile
This commit is contained in:
1 parent
894946c319
commit
2cfe6f8c60
3 files changed
+17
-9
No files matched your search
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user