From 14e63880111e54a31ff3376b3141daf39992a52c Mon Sep 17 00:00:00 2001 From: Bogdan Sava Date: Fri, 8 Jan 2021 14:59:27 +0200 Subject: [PATCH] add logout server side Signed-off-by: Bogdan Sava --- src/user-options-menu.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/user-options-menu.js b/src/user-options-menu.js index af451c68..a2ae516e 100644 --- a/src/user-options-menu.js +++ b/src/user-options-menu.js @@ -35,6 +35,7 @@ class UserOptions extends PolymerElement { } +
- +
+ Signed in as:
[[user.username]]

Roles: [[user.roles]] @@ -60,12 +62,15 @@ class UserOptions extends PolymerElement { Help About
- - - Sign out - - -
+ + + + Sign out + + + +
+
@@ -82,6 +87,8 @@ class UserOptions extends PolymerElement { } _logout() { + this.$.userAjax.url = "/api/logout"; + this.$.userAjax._go(); var customEvent = new CustomEvent('logout', { bubbles: true, composed: true,