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

Wrong tournament join check #47

Closed ricnava00 closed 1 year ago

ricnava00 commented 1 year ago

The tournament joining is allowed only to the creator of the team, while instead it should be allowed only to the team leader (property of the player). I haven't checked if this happens in other instances

FabioPatella commented 1 year ago

else if(!(this.state.playerteam.teamMembers.find(elem=>elem.username=== sessionStorage.getItem("username") && elem.role==="LEADER"))){ formtodisplay =

you are not the leader of your team. Please ask the leader to join this tournament

}

in iframe branch there is this check

ricnava00 commented 1 year ago

Ok sorry, then I was probably testing on the dev branch