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

changed behavior for missing user, in the SetCurrentUser middleware #92

Merged
merged 1 commit into from
Feb 4, 2023

Conversation

sio4
Copy link
Member

@sio4 sio4 commented Feb 4, 2023

What is being done in this PR?

In the scaffolded actions/users.go, middleware SetCurrentUser just returned a general error which causes a 404 error. However, it could be better if the middleware generates Unauthorized or just redirects users to the login page. With this change, the middleware redirects the user to the login page.

fixes #30

see also: #30 (comment)

What are the main choices made to get to this solution?

  • the selected solution is redirecting the user to the login page. it could be nice for interactive applications.
  • however, since this is just a scaffold code, users can modify their application with their own use cases.

List the manual test cases you've covered before sending this PR:

  • tested with a simple todo application

@sio4 sio4 added this to the v1.5.0 milestone Feb 4, 2023
@sio4 sio4 requested a review from a team February 4, 2023 06:44
@sio4 sio4 self-assigned this Feb 4, 2023
@sio4 sio4 merged commit e72d518 into main Feb 4, 2023
@sio4 sio4 deleted the fixing-no-rows-in-result-set-issue branch February 4, 2023 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App failure after running buffalo g auth
1 participant