POLIMI-FER-codebenders / tournament_app

Tournament app for Code Defenders made by student team of POLIMI and FER students
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Refuse joining other team if user is already leader of the team #76

Closed DominikBrdar closed 1 year ago

DominikBrdar commented 1 year ago

If user is in a team and they go to join team and click on join other team they are asked if they are sure they want to do this as it would kick them from their team. This is good but if that user is leader of the team that team would lose its leader and it would become useless (without leader it can't join to tournament and it can't assign new leader)

ricnava00 commented 1 year ago

This is probably a bug, a player shouldn't be able to call join if they're already in another team. On the backend it's easy to go both directions, either not allowing this or as you said allowing this only if they're not the leader. What do you want to do in the frontend?

ricnava00 commented 1 year ago

After discussing it we think it's better to use /join only for joining teams, and we will disallow joining another team. You can still do this in the frontend if you want, by calling /leave before, checking the result, and then calling the new /join, otherwise just give some notice to the user that they have to manually leave the old team to join a new one

ricnava00 commented 1 year ago

24