mirror of
https://github.com/correl/mage.git
synced 2024-12-01 11:09:56 +00:00
spjspj - Make test mode of server not care about password
This commit is contained in:
parent
e97d9dc0e2
commit
8a8ca87c8d
1 changed files with 8 additions and 2 deletions
|
@ -185,9 +185,15 @@ public class Session {
|
|||
AuthorizedUser authorizedUser = null;
|
||||
if (ConfigSettings.getInstance().isAuthenticationActivated()) {
|
||||
authorizedUser = AuthorizedUserRepository.instance.getByName(userName);
|
||||
if (authorizedUser == null || !authorizedUser.doCredentialsMatch(userName, password)) {
|
||||
return "Wrong username or password. In case you haven't, please register your account first.";
|
||||
String errorMsg = "Wrong username or password. In case you haven't, please register your account first.";
|
||||
if (authorizedUser == null) {
|
||||
return errorMsg;
|
||||
}
|
||||
|
||||
if (!Main.isTestMode() && !authorizedUser.doCredentialsMatch(userName, password)) {
|
||||
return errorMsg;
|
||||
}
|
||||
|
||||
if (!authorizedUser.active) {
|
||||
return "Your profile is deactivated, you can't sign on.";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue