mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix panic when view profile without signin
Also fix that no matter who, still able to see organizations with private membership.
This commit is contained in:
@@ -75,7 +75,7 @@ func Profile(ctx *middleware.Context) {
|
||||
ctx.Data["PageIsUserProfile"] = true
|
||||
ctx.Data["Owner"] = u
|
||||
|
||||
orgs, err := models.GetOrgsByUserIDDesc(u.Id, "updated", ctx.User.IsAdmin || ctx.User.Id == u.Id)
|
||||
orgs, err := models.GetOrgsByUserID(u.Id, ctx.IsSigned && (ctx.User.IsAdmin || ctx.User.Id == u.Id))
|
||||
if err != nil {
|
||||
ctx.Handle(500, "GetOrgsByUserIDDesc", err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user