Skip to content

Commit

Permalink
fixes #720 admin login & property based auth: invalid credential mess…
Browse files Browse the repository at this point in the history
…age does not appear

Signed-off-by: Julien Buret <jburet@voyages-sncf.com>
  • Loading branch information
vsct-jburet committed Jan 2, 2020
1 parent 2d40f0f commit c09475c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
font-size: smaller;
cursor: pointer;
}
.error {
.error-message {
color: red;
}
.success {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@
id="input-password"
placeholder="Password"
[required]="true">
<ng-container *ngIf="userPassword.invalid && userPassword.touched ">
<ng-container *ngIf="errorMessage || (userPassword.invalid && userPassword.touched)">
<p class="error-message" *ngIf="userPassword.errors?.required">
Password is required!
</p>
<p class="error-message" *ngIf="errorMessage">
{{errorMessage}}
</p>
</ng-container>
</div>
<div class="row">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ internal object PropertyBasedAuthProvider : TockAuthProvider {
resultHandler.handle(Future.succeededFuture(tockUser))
}
}
?: Future.failedFuture<User>("invalid credentials")
?: resultHandler.handle(Future.failedFuture<User>("invalid credentials"))
}


Expand Down

0 comments on commit c09475c

Please sign in to comment.