From 87901ed7098dff72e4a62dfe582c2b83439b7280 Mon Sep 17 00:00:00 2001 From: Petr Voborník Date: Fri, 24 Feb 2012 15:31:55 +0100 Subject: Added logout button Logout button was added to Web UI. Click on logout button executes session_logout command. If command succeeds or xhr stutus is 401 (unauthorized - already logged out) page is redirected to logout.html. logout.html is a simple page with "You have been logged out" text and a link to return back to main page. https://fedorahosted.org/freeipa/ticket/2363 --- install/ui/webui.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'install/ui/webui.js') diff --git a/install/ui/webui.js b/install/ui/webui.js index b8394d28..5d32e797 100644 --- a/install/ui/webui.js +++ b/install/ui/webui.js @@ -170,6 +170,11 @@ $(function() { $('#loggedinas a').fragment( {'user-facet': 'details', 'user-pkey': IPA.whoami_pkey}, 2); + $('#logout').click(function() { + IPA.logout(); + return false; + }).text(IPA.messages.login.logout); + IPA.nav = create_navigation(); IPA.nav.create(); IPA.nav.update(); -- cgit