Allow admins to spectate any password protected game

This commit is contained in:
Ruben 2018-08-30 12:32:40 +02:00
parent c27fcc818f
commit f1639dccc5
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ public class SpectateGameHandler 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);
}