GUAC-1213: Add error messages for invalid/inaccessible accounts.

This commit is contained in:
Michael Jumper
2015-07-30 18:05:26 -07:00
parent e164d5b814
commit c526a67d7e
2 changed files with 4 additions and 2 deletions

View File

@@ -302,11 +302,11 @@ public class UserService extends ModeledDirectoryObjectService<ModeledUser, User
// Verify user account is still valid as of today
if (!user.isAccountValid())
throw new GuacamoleClientException("LOGIN.ERROR_NO_LONGER_VALID");
throw new GuacamoleClientException("LOGIN.ERROR_NOT_VALID");
// Verify user account is allowed to be used at the current time
if (!user.isAccountAccessible())
throw new GuacamoleClientException("LOGIN.ERROR_NOT_WITHIN_ACCESS_WINDOW");
throw new GuacamoleClientException("LOGIN.ERROR_NOT_ACCESSIBLE");
// Update password if password is expired
if (userModel.isExpired()) {

View File

@@ -5,6 +5,8 @@
"ERROR_PASSWORD_BLANK" : "@:APP.ERROR_PASSWORD_BLANK",
"ERROR_PASSWORD_SAME" : "The new password must be different from the expired password.",
"ERROR_PASSWORD_MISMATCH" : "@:APP.ERROR_PASSWORD_MISMATCH",
"ERROR_NOT_VALID" : "This user account is not currently valid.",
"ERROR_NOT_ACCESSIBLE" : "Access to this account is not currently allowed. Please try again later.",
"INFO_PASSWORD_EXPIRED" : "Your password has expired and must be reset. Please enter a new password to continue.",