diff options
author | Gervase Markham <gerv@gerv.net> | 2014-12-22 10:53:22 +0100 |
---|---|---|
committer | Gervase Markham <gerv@gerv.net> | 2014-12-22 10:53:22 +0100 |
commit | 17a4afe9818289e53969f9eec2cef2367a2d6104 (patch) | |
tree | 743b4dfd0fbc40c6f9411ea9d67c133aff4b4387 /extensions/BMO/template/en/default | |
parent | f7afaa06475eec2d797c70844ed85661d189c368 (diff) | |
download | bugzilla-17a4afe9818289e53969f9eec2cef2367a2d6104.tar.gz bugzilla-17a4afe9818289e53969f9eec2cef2367a2d6104.tar.xz |
Bug 836713 - Make group membership reports publicly-available. r=glob.
Diffstat (limited to 'extensions/BMO/template/en/default')
3 files changed, 36 insertions, 11 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 fd48130eb..34c51db81 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,17 +24,21 @@ <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') || user.in_group('infrasec') %] + [% IF user.in_group('editbugs') %] <li> <strong> <a href="[% urlbase FILTER none %]page.cgi?id=group_admins.html">Group Admins</a> </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> + [% END %] + [% IF user.in_group('editbugs') %] <li> <strong> <a href="[% urlbase FILTER none %]page.cgi?id=group_members.html">Group Members Report</a> diff --git a/extensions/BMO/template/en/default/pages/group_members.html.tmpl b/extensions/BMO/template/en/default/pages/group_members.html.tmpl index daf4d5b0d..67db8ea2e 100644 --- a/extensions/BMO/template/en/default/pages/group_members.html.tmpl +++ b/extensions/BMO/template/en/default/pages/group_members.html.tmpl @@ -11,6 +11,8 @@ style_urls = [ "extensions/BMO/web/styles/reports.css" ] %] +[% SET privileged = (user.in_group('editusers') || user.in_group('infrasec')) %] + <form method="GET" action="page.cgi"> <input type="hidden" name="id" value="group_members.html"> @@ -48,15 +50,23 @@ <th>Type</th> <th>Count</th> <th>Members</th> - <th class="right">Last Seen (days ago)</th> + [% IF privileged %] + <th class="right">Last Seen (days ago)</th> + [% END %] </tr> [% FOREACH type = types %] [% count = loop.count() %] <tr class="report_item [% count % 2 == 1 ? "report_row_odd" : "report_row_even" %]"> <td valign="top"> - [% "via " UNLESS type.name == 'direct' %] - [% type.name FILTER html %] + [% IF type.name == 'direct' %] + direct + [% ELSE %] + via + [% IF privileged %] + [% type.name FILTER html %] + [% ELSE %]another group[% END %] + [% END %] </td> <td valign="top" align="right"> [% type.members.size FILTER html %] @@ -66,16 +76,23 @@ [% FOREACH member = type.members %] <tr> <td width="100%"> - <a href="editusers.cgi?action=edit&userid=[% member.id FILTER none %]" - target="_blank"> + [% IF privileged %] + <a href="editusers.cgi?action=edit&userid=[% member.id FILTER none %]" + target="_blank"> + [% ELSE %] + <a href="user_profile?login=[% member.login FILTER uri %]" + target="_blank"> + [% END %] <span [% 'class="bz_inactive"' UNLESS member.is_enabled %]> [% member.name FILTER html %] <[% member.email FILTER email FILTER html %]> </span> </a> </td> - <td align="right" nowrap> - [% member.lastseen FILTER html %] - </td> + [% IF privileged %] + <td align="right" nowrap> + [% member.lastseen FILTER html %] + </td> + [% END %] </tr> [% END %] </table> diff --git a/extensions/BMO/template/en/default/pages/group_members.json.tmpl b/extensions/BMO/template/en/default/pages/group_members.json.tmpl index 8cbb2a23a..e982731f7 100644 --- a/extensions/BMO/template/en/default/pages/group_members.json.tmpl +++ b/extensions/BMO/template/en/default/pages/group_members.json.tmpl @@ -20,12 +20,16 @@ "membership": "direct", [% ELSE %] "membership": "indirect", - "group": "[% type.name FILTER js %]", + [% IF user.in_group('editusers') || user.in_group('infrasec') %] + "group": "[% type.name FILTER js %]", + [% END %] [% END %] [% IF include_disabled %] "disabled": "[% member.is_enabled ? "false" : "true" %]", [% END %] - "lastseen": "[% member.lastseen FILTER js %]" + [% IF user.in_group('editusers') || user.in_group('infrasec') %] + "lastseen": "[% member.lastseen FILTER js %]" + [% END %] }[% "," UNLESS i == count %] [% END %] [% END %] |