mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 20:32:11 +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:
parent
f38d5e57dd
commit
aa12135b97
2 changed files with 10 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue