From: Bill Erickson Date: Wed, 25 Jul 2018 20:22:09 +0000 (-0400) Subject: LP#1775466 WS removal loop bug repair X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fcf8bb71137690457b81e5be85bb806e858b5f50;p=working%2FEvergreen.git LP#1775466 WS removal loop bug repair Signed-off-by: Bill Erickson --- 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 {