Merge pull request #188 from Rubueno/master
Allow admins to spectate any password protected game
This commit is contained in:
commit
5215d8c303
|
@ -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