diff --git a/login/user.component.ts b/login/user.component.ts index b76d5bb8..44e23177 100644 --- a/login/user.component.ts +++ b/login/user.component.ts @@ -1,13 +1,12 @@ -import {Component, Inject, Input, Optional} from '@angular/core'; +import {Component, Input} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; -import {Meta, Title} from '@angular/platform-browser'; +import {Title, Meta} from '@angular/platform-browser'; -import {Session, User} from './utils/helper.class'; +import {User, Session} from './utils/helper.class'; import {RouterHelper} from '../utils/routerHelper.class'; import {EnvProperties} from '../utils/properties/env-properties'; import {UserManagementService} from "../services/user-management.service"; -import {RESPONSE} from "@nguniversal/express-engine/tokens"; @Component({ selector: 'user', @@ -33,8 +32,7 @@ export class UserComponent { private route: ActivatedRoute, private _meta: Meta, private _title: Title, - private userManagementsService: UserManagementService, - @Optional() @Inject(RESPONSE) private response: any) { + private userManagementsService: UserManagementService) { var title = "OpenAIRE | Login"; this._title.setTitle(title); @@ -60,17 +58,6 @@ export class UserComponent { this.errorMessage = ""; if (this.loggedIn && this.errorCode == '1') { this.redirect(); - } else { - if (this.errorCode == '1') { - this.response.statusCode = 403; - this.response.statusMessage = '403 - Forbidden'; - } else if (this.errorCode == '2' || this.errorCode == '3' || this.errorCode == '5') { - this.response.statusCode = 401; - this.response.statusMessage = '401 - Unauthorized'; - } else { - this.response.statusCode = 400; - this.response.statusMessage = '400 - Bad Request'; - } } }); });