From 8e27c1e655dbe5a2c79b4d8765e3f5bf86249ae4 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 25 Jul 2018 16:22:09 -0400 Subject: [PATCH] LP#1775466 WS removal loop bug repair Signed-off-by: Bill Erickson --- Open-ILS/src/eg2/src/app/staff/login.component.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/login.component.ts b/Open-ILS/src/eg2/src/app/staff/login.component.ts index 3413ea29b1..0083c321bb 100644 --- a/Open-ILS/src/eg2/src/app/staff/login.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/login.component.ts @@ -59,10 +59,8 @@ export class StaffLoginComponent implements OnInit { // post-login URL let url: string = this.auth.redirectUrl || '/staff/splash'; - // prevent sending the user back to the login page or looping - // back to the workstation removal page. - if (url.startsWith('/staff/login') || - url.startsWith('/staff/admin/workstation/workstations/remove/')) { + // prevent sending the user back to the login page + if (url.startsWith('/staff/login')) { url = '/staff/splash'; } @@ -75,6 +73,9 @@ export class StaffLoginComponent implements OnInit { if (this.auth.workstationState === AuthWsState.NOT_FOUND_SERVER) { // User attempted to login with a workstation that is // unknown to the server. Redirect to the WS admin page. + // Reset the WS state to avoid looping back to WS removal + // page before the new workstation can be activated. + this.auth.workstationState = AuthWsState.PENDING; this.router.navigate( [`/staff/admin/workstation/workstations/remove/${workstation}`]); } else { -- 2.11.0