Allow admins to join any game
This commit is contained in:
parent
5d05f2e85b
commit
332da9b77e
|
@ -62,7 +62,7 @@ public class JoinGameHandler extends GameHandler {
|
||||||
|
|
||||||
final String password = request.getParameter(AjaxRequest.PASSWORD);
|
final String password = request.getParameter(AjaxRequest.PASSWORD);
|
||||||
final String gamePassword = game.getPassword();
|
final String gamePassword = game.getPassword();
|
||||||
if (gamePassword != null && !gamePassword.equals("")) {
|
if (gamePassword != null && !gamePassword.equals("") && !user.isAdmin()) {
|
||||||
if (password == null || !gamePassword.equals(password)) {
|
if (password == null || !gamePassword.equals(password)) {
|
||||||
return error(ErrorCode.WRONG_PASSWORD);
|
return error(ErrorCode.WRONG_PASSWORD);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue