Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 500 when getting user as unauthenticated user (#8653) #8662

Merged
merged 3 commits into from
Oct 24, 2019

Commits on Oct 24, 2019

  1. Fix 500 when getting user as unauthenticated user

    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,
    go gets really unhappy.
    emonty committed Oct 24, 2019
    Configuration menu
    Copy the full SHA
    372d274 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    225f35e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1a793e8 View commit details
    Browse the repository at this point in the history