Merge pull request #182 from tyzoid/master

Allow admins to join passworded games
This commit is contained in:
Andy Janata 2018-08-02 08:46:45 -07:00 committed by GitHub
commit 4cd2af9b23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ public class JoinGameHandler extends GameHandler {
final String password = request.getParameter(AjaxRequest.PASSWORD);
final String gamePassword = game.getPassword();
if (gamePassword != null && !gamePassword.equals("")) {
if (gamePassword != null && !gamePassword.equals("") && !user.isAdmin()) {
if (password == null || !gamePassword.equals(password)) {
return error(ErrorCode.WRONG_PASSWORD);
}