From abaf75fb294a796fc6c99904ab3b47a2367a3792 Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Thu, 16 Mar 2017 09:03:22 +0000
Subject: [PATCH] #3527 fix - Added logout button and routing refactoring 

---
 securis/src/main/webapp/src/app/menu.component.ts |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/securis/src/main/webapp/src/app/menu.component.ts b/securis/src/main/webapp/src/app/menu.component.ts
index ab65248..0e5cd83 100644
--- a/securis/src/main/webapp/src/app/menu.component.ts
+++ b/securis/src/main/webapp/src/app/menu.component.ts
@@ -22,10 +22,16 @@
       this.userService.isLoggedIn().subscribe(authOk => {
         let isLoggedIn = authOk.valueOf();
         if (!isLoggedIn) {
-          this.router.navigateByUrl('nomenu/login');
+          this.router.navigateByUrl('public/login');
+        } else {
+          this.router.navigate(['packs']);
         }
       }  , 
-      err => /* Show message */ this.router.navigateByUrl('nomenu/login'));  
+      err => /* Show message */ this.router.navigateByUrl('public/login'));  
+  }
+
+  public logout() {
+    this.userService.logout();
   }
 
   public closeMenu() {

--
Gitblit v1.3.2