From e69219184b1a3262ec5e617d30337b6431c9840c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 8 Aug 2018 14:58:21 +0200 Subject: Implement user blocking on server side --- client/src/app/login/login.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/src/app/login/login.component.ts b/client/src/app/login/login.component.ts index 56f992b5d..9a68c12fa 100644 --- a/client/src/app/login/login.component.ts +++ b/client/src/app/login/login.component.ts @@ -55,7 +55,11 @@ export class LoginComponent extends FormReactive implements OnInit { .subscribe( () => this.redirectService.redirectToHomepage(), - err => this.error = err.message + err => { + if (err.message.indexOf('credentials are invalid') !== -1) this.error = this.i18n('Incorrect username or password.') + else if (err.message.indexOf('blocked') !== -1) this.error = this.i18n('You account is blocked.') + else this.error = err.message + } ) } -- cgit v1.2.3