Allow admins to spectate any password protected game
This commit is contained in:
parent
c27fcc818f
commit
f1639dccc5
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue