Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
Fix login error message
Browse files Browse the repository at this point in the history
Respose for invalid credentials changed and login page
was no longer displaying the correct error message to
the user when invalid credentials were entered.

Resolves #72

Tested: Logged in with incorrect credentials and saw the
        correct message. Also logged in with an unreachable
        host and saw that that message was displaying
        correctly.

Change-Id: I65cc6d6a061986568aded09555c5f75bcd59fe56
Signed-off-by: beccabroek <beccabroek@gmail.com>
  • Loading branch information
BeccaBroek authored and gtmills committed Mar 27, 2019
1 parent 20f7715 commit b5c5dc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/common/services/userModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ window.angular && (function(angular) {
response && response.data && response.data.data &&
response.data.data.description) {
callback(false, response.data.data.description);
} else if (response && response.message) {
callback(false, response.message);
} else if (response && response.statusText) {
callback(false, response.statusText);
} else if (error) {
callback(false, 'Server unreachable');
} else {
Expand Down
2 changes: 1 addition & 1 deletion app/login/controllers/login-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ window.angular && (function(angular) {
$window.location.href = next;
}
} else {
if (description === 'Invalid username or password') {
if (description === 'Unauthorized') {
$scope.invalidCredentials = true;
} else {
$scope.serverUnreachable = true;
Expand Down

0 comments on commit b5c5dc5

Please sign in to comment.