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

Should redirect to login if try to create team if no teams and when not yet authorized yet #19

Open
ltfschoen opened this issue Aug 17, 2024 · 0 comments

Comments

@ltfschoen
Copy link

ltfschoen commented Aug 17, 2024

when you first run it in a development environment, the page http://localhost:3000/teams loads.
if you haven't bothered to run rake db:seed, then it gives you the option to click "There are no teams yet. Maybe create your own?" it takes you to http://localhost:3000/teams/new, but i think it should fail gracefully and notify the user that they need to login first if they haven't already and redirect them to login.
at the moment if they haven't logged in it shows error Pundit::NotAuthorizedError at /teams/new crashing on line 11 in app/controllers/hacking_teams_controller.rb

@ltfschoen ltfschoen changed the title Should redirect to login if try to create team when not yet authorized yet Should redirect to login if try to create team if no teams and when not yet authorized yet Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant