1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-27 11:04:26 +00:00
gitea/routers/api
Monty Taylor 9bde52ffc1 Fix 500 when getting user as unauthenticated user (#8653) (#8663)
Backport #8653

When doing GET /api/v1/users/{user} as an unauthenticated user,
gitea throws a 500 because it's trying to dereference elements
from the context user. It wants to do this to see whether to
show the primary email and will do that if the logged in user
is admin or the user in question. However, if ctx.User is nil there is a panic
2019-10-25 13:09:15 +01:00
..
v1 Fix 500 when getting user as unauthenticated user (#8653) (#8663) 2019-10-25 13:09:15 +01:00