summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-01-23 09:27:03 +0100
committerByron Jones <bjones@mozilla.com>2013-01-23 09:27:03 +0100
commitf2a29007f96f33da77440cd10f475c2af946573e (patch)
treecc8d4772bf7ab8eac52cfe5f5646c125c983e7c1 /extensions/BMO/template/en
parent3c50104166023a136d0e4cee22322904521eae87 (diff)
downloadbugzilla-f2a29007f96f33da77440cd10f475c2af946573e.tar.gz
bugzilla-f2a29007f96f33da77440cd10f475c2af946573e.tar.xz
Bug 812433: create a report for auditing bugzilla security group membership
Diffstat (limited to 'extensions/BMO/template/en')
-rw-r--r--extensions/BMO/template/en/default/hook/reports/menu-end.html.tmpl11
-rw-r--r--extensions/BMO/template/en/default/pages/email_queue.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/pages/group_admins.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/pages/group_members.html.tmpl97
-rw-r--r--extensions/BMO/template/en/default/pages/group_members.json.tmpl32
-rw-r--r--extensions/BMO/template/en/default/pages/group_membership.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/pages/user_activity.html.tmpl2
7 files changed, 140 insertions, 8 deletions
diff --git a/extensions/BMO/template/en/default/hook/reports/menu-end.html.tmpl b/extensions/BMO/template/en/default/hook/reports/menu-end.html.tmpl
index dae7f9108..35644c1e4 100644
--- a/extensions/BMO/template/en/default/hook/reports/menu-end.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/reports/menu-end.html.tmpl
@@ -24,19 +24,22 @@
<a href="[% urlbase FILTER none %]page.cgi?id=release_tracking_report.html">Release Tracking Report</a>
</strong> - For triaging release-train flag information.
</li>
- [% IF user.in_group('editusers') %]
+ [% IF user.in_group('editusers') || user.in_group('infrasec') %]
<li>
<strong>
<a href="[% urlbase FILTER none %]page.cgi?id=group_admins.html">Group Admins</a>
- </strong> - Group Admins Report
+ </strong> - Lists the administrators of each group.
</li>
- [% END %]
- [% IF user.in_group('editusers') || user.in_group('infrasec') %]
<li>
<strong>
<a href="[% urlbase FILTER none %]page.cgi?id=group_membership.html">Group Membership Report</a>
</strong> - Lists the groups a user is a member of.
</li>
+ <li>
+ <strong>
+ <a href="[% urlbase FILTER none %]page.cgi?id=group_members.html">Group Members Report</a>
+ </strong> - Lists the users of groups.
+ </li>
[% END %]
[% IF user.in_group('admin') || user.in_group('infra') %]
<li>
diff --git a/extensions/BMO/template/en/default/pages/email_queue.html.tmpl b/extensions/BMO/template/en/default/pages/email_queue.html.tmpl
index 0e4a37551..5c7970506 100644
--- a/extensions/BMO/template/en/default/pages/email_queue.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/email_queue.html.tmpl
@@ -15,7 +15,7 @@
<p><i>[% jobs.size FILTER none %] email(s) in the queue.</i></p>
- <table id="report" cellspacing="0" border="0">
+ <table id="report" class="hover" cellspacing="0" border="0">
<tr id="report-header">
<th>Insert Time</th>
<th>Run Time</th>
diff --git a/extensions/BMO/template/en/default/pages/group_admins.html.tmpl b/extensions/BMO/template/en/default/pages/group_admins.html.tmpl
index 1afcdb0b8..01bb744c4 100644
--- a/extensions/BMO/template/en/default/pages/group_admins.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/group_admins.html.tmpl
@@ -25,7 +25,7 @@
%]
[% IF groups.size > 0 %]
- <table border="0" cellspacing="0" id="report" width="100%">
+ <table border="0" cellspacing="0" id="report" class="hover" width="100%">
<tr id="report-header">
<th align="left">Name</th>
<th align="left">Admins</th>
diff --git a/extensions/BMO/template/en/default/pages/group_members.html.tmpl b/extensions/BMO/template/en/default/pages/group_members.html.tmpl
new file mode 100644
index 000000000..daf4d5b0d
--- /dev/null
+++ b/extensions/BMO/template/en/default/pages/group_members.html.tmpl
@@ -0,0 +1,97 @@
+[%# 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.
+ #%]
+
+[% INCLUDE global/header.html.tmpl
+ title = "Group Members Report"
+ style_urls = [ "extensions/BMO/web/styles/reports.css" ]
+%]
+
+<form method="GET" action="page.cgi">
+ <input type="hidden" name="id" value="group_members.html">
+
+ <table id="parameters">
+ <tr>
+ <th>Group</th>
+ <td>
+ <select name="group">
+ [% FOREACH group_name = groups %]
+ <option value="[% group_name FILTER html %]"
+ [% "selected" IF group_name == group %]>
+ [% group_name FILTER html %]</option>
+ [% END %]
+ </select>
+ <input type="checkbox" name="include_disabled" id="include_disabled"
+ value="1" [% "checked" IF include_disabled %]>
+ <label for="include_disabled">
+ Include disabled users
+ </label>
+ <input type="submit" value="Generate">
+ </td>
+ </tr>
+ </table>
+</form>
+
+[% IF group != '' %]
+
+ <p>
+ Members of the <b>[% group FILTER html %]</b> group:
+ </p>
+
+ [% IF types.size > 0 %]
+ <table border="0" cellspacing="0" id="report" class="nohover" width="100%">
+ <tr id="report-header">
+ <th>Type</th>
+ <th>Count</th>
+ <th>Members</th>
+ <th class="right">Last Seen (days ago)</th>
+ </tr>
+
+ [% FOREACH type = types %]
+ [% count = loop.count() %]
+ <tr class="report_item [% count % 2 == 1 ? "report_row_odd" : "report_row_even" %]">
+ <td valign="top">
+ [% "via&nbsp;" UNLESS type.name == 'direct' %]
+ [% type.name FILTER html %]
+ </td>
+ <td valign="top" align="right">
+ [% type.members.size FILTER html %]
+ </td>
+ <td valign="top" width="100%" colspan="2">
+ <table cellspacing="0" class="hoverrow">
+ [% FOREACH member = type.members %]
+ <tr>
+ <td width="100%">
+ <a href="editusers.cgi?action=edit&amp;userid=[% member.id FILTER none %]"
+ target="_blank">
+ <span [% 'class="bz_inactive"' UNLESS member.is_enabled %]>
+ [% member.name FILTER html %] &lt;[% member.email FILTER email FILTER html %]&gt;
+ </span>
+ </a>
+ </td>
+ <td align="right" nowrap>
+ [% member.lastseen FILTER html %]
+ </td>
+ </tr>
+ [% END %]
+ </table>
+ </td>
+ </tr>
+ [% END %]
+ </table>
+
+ <a href="page.cgi?id=group_members.json&amp;group=[% group FILTER uri %]
+ [% IF include_disabled %]&amp;include_disabled=1[% END %]">JSON</a>
+ [% ELSE %]
+ <p>
+ <i>This group is empty.</i>
+ </p>
+ [% END %]
+
+[% END %]
+
+[% INCLUDE global/footer.html.tmpl %]
diff --git a/extensions/BMO/template/en/default/pages/group_members.json.tmpl b/extensions/BMO/template/en/default/pages/group_members.json.tmpl
new file mode 100644
index 000000000..f80fc8c5f
--- /dev/null
+++ b/extensions/BMO/template/en/default/pages/group_members.json.tmpl
@@ -0,0 +1,32 @@
+[%# 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.
+ #%]
+
+[
+ [% SET count = 0 %]
+ [% FOREACH type = types %]
+ [% SET count = count + type.members.size %]
+ [% END %]
+ [% SET i = 0 %]
+ [% FOREACH type = types %]
+ [% FOREACH member = type.members %]
+ [% SET i = i + 1 %]
+ { "login": "[% member.login FILTER email FILTER js %]",
+ [% IF type.name == "direct" %]
+ "membership": "direct",
+ [% ELSE %]
+ "membership": "indirect",
+ "group": [% type.name FILTER js %]",
+ [% END %]
+ [% IF include_disabled %]
+ "disabled": "[% member.is_enabled ? "false" : "true" %]",
+ [% END %]
+ "lastseen": "[% member.lastseen FILTER js %]"
+ }[% "," UNLESS i == count %]
+ [% END %]
+ [% END %]
+]
diff --git a/extensions/BMO/template/en/default/pages/group_membership.html.tmpl b/extensions/BMO/template/en/default/pages/group_membership.html.tmpl
index 2680c7da2..32484b13f 100644
--- a/extensions/BMO/template/en/default/pages/group_membership.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/group_membership.html.tmpl
@@ -48,7 +48,7 @@
[% IF users.size %]
- <table border="0" cellspacing="0" id="report" width="100%">
+ <table border="0" cellspacing="0" id="report" class="hover" width="100%">
[% FOREACH u = users %]
<tr>
<th colspan="3">[% u.user.identity FILTER html %]</th>
diff --git a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
index 377d7c244..f299b862b 100644
--- a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
@@ -106,7 +106,7 @@
[% IF operations.size > 0 %]
<br>
- <table border="1" cellpadding="4" cellspacing="0" id="report">
+ <table border="1" cellpadding="4" cellspacing="0" id="report" class="hover">
<tr id="report-header">
[% IF who_count > 1 %]
<th>Who</th>