From d03b432557e0422d5b0dbd32e82d36d3f9a5b68a Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 24 Aug 2015 14:04:19 -0400 Subject: Bug 1192687 - add the ability for users to view and revoke existing sessions --- template/en/default/account/prefs/prefs.html.tmpl | 6 +++ .../en/default/account/prefs/sessions.html.tmpl | 56 ++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 template/en/default/account/prefs/sessions.html.tmpl (limited to 'template/en/default') diff --git a/template/en/default/account/prefs/prefs.html.tmpl b/template/en/default/account/prefs/prefs.html.tmpl index 9610752ed..679a3cb30 100644 --- a/template/en/default/account/prefs/prefs.html.tmpl +++ b/template/en/default/account/prefs/prefs.html.tmpl @@ -71,6 +71,12 @@ link => "userprefs.cgi?tab=saved-searches", saveable => "1" }, + { + name => "sessions", + label => "Sessions", + link => "userprefs.cgi?tab=sessions", + saveable => "1", + }, { name => "apikey", label => "API Keys", diff --git a/template/en/default/account/prefs/sessions.html.tmpl b/template/en/default/account/prefs/sessions.html.tmpl new file mode 100644 index 000000000..13257ef01 --- /dev/null +++ b/template/en/default/account/prefs/sessions.html.tmpl @@ -0,0 +1,56 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# INTERFACE: + # sessions: array. Array of sessions this user has. + # session_max: int. Number of sessions that can be displayed at once. + # session_count: int. Total of number of sessions for the user. + # too_many_sessions: boolean. True if there are more than 20 sessions. + #%] + +

Here you can see your active [% terms.Bugzilla %] sessions. + You can logout these sessions, which means when you use [% terms.Bugzilla %] + from that location again you will have to log back in.

+ +

Note that you may not logout your current session from this page. + You can use the "Logout" link from the top right menu for that.

+ +

Active Sessions

+ +[% IF too_many_sessions %] +

You have [% session_count FILTER html %] sessions. Display limited to most + recent [% session_max FILTER html %].

+[% END %] + +

+ +

+ + + + + + + + + + [% FOREACH session IN sessions %] + + + + + [% END %] + + [% END %] +
Last usedIP AddressIP RestrictionLogout
[% session.lastused FILTER time %][% session.ipaddr OR "Unknown" FILTER html %][% session.restrict_ipaddr ? "Restricted" : "Unrestricted" FILTER html %] + + [% IF session.current %] + (current) + [% ELSE %] +
\ No newline at end of file -- cgit v1.2.3-24-g4f1b