Initial Superuser can get in a "stuck" state
imnotjames opened this issue ยท 2 comments
Describe the bug
If a super user is created but then - say, because they get distracted watching Galaxy of Terror ๐
- gets logged out without creating a team, they're stuck. They can't authenticate again that way because they aren't on a team, they never created one.
To Reproduce
Steps to reproduce the behavior:
- Set up an empty portr instance
- Log in and create the first superuser but DO NOT create a team
- Delete cookie for session
- Attempt to Log in again
- See error message
Expected behavior
Superuser can log in even if they aren't on a team - so they can create a team
Screenshots
Error message is shown User not part of any team
Additional context
Fixed as part of #25 but there's a number of other changes there..
Is the first user getting stuck? This solves it, right?
portr/admin/src/portr_admin/main.py
Lines 60 to 62 in 0042a49
That kind of check could work but that would just redirect the user after they're logged in.
The issue is that the user cannot log back in again - if they're logged out they're not able to log back in without an error message.