summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-10-05 18:29:02 +0200
committerByron Jones <glob@mozilla.com>2015-10-05 18:29:02 +0200
commitbbd091bd25c907f6f18fed0b8ccc351429261956 (patch)
tree753e96f9c2484bf2a49d546a4f8e537f4d73e465 /extensions/BMO/template
parent42270ffc2922c5883485804b7d76b8e2c8cb3ba1 (diff)
downloadbugzilla-bbd091bd25c907f6f18fed0b8ccc351429261956.tar.gz
bugzilla-bbd091bd25c907f6f18fed0b8ccc351429261956.tar.xz
Bug 1164063 - show a warning near the attachments table for sec-high/sec-crit bugs without sec-approval? on patches
Diffstat (limited to 'extensions/BMO/template')
-rw-r--r--extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl30
-rw-r--r--extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl24
2 files changed, 40 insertions, 14 deletions
diff --git a/extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl b/extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl
index bc4480084..693051996 100644
--- a/extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl
@@ -7,12 +7,26 @@
#%]
[%
- RETURN UNLESS user.in_group('editbugs');
- RETURN UNLESS bug.attachments.size && bug.is_unassigned && bug.has_current_patch;
+ RETURN UNLESS user.in_group('editbugs') || bug.assigned_to.id == user.id;
+ RETURN UNLESS bug.attachments.size && bug.has_current_patch;
%]
-<tr class="bz_attach_footer">
- <td colspan="[% show_attachment_flags ? 3 : 2 %]" id="unassigned_with_patches">
- <img src="extensions/BMO/web/images/sign_warning.png" width="16" height="16">
- Unassigned [% terms.bug %] with patches attached
- </td>
-</tr>
+
+[% IF bug.is_unassigned %]
+ <tr class="bz_attach_footer">
+ <td colspan="[% show_attachment_flags ? 3 : 2 %]" class="attachment-warning">
+ <img src="extensions/BMO/web/images/sign_warning.png" width="16" height="16">
+ Unassigned [% terms.bug %] with patches attached
+ </td>
+ </tr>
+[% END %]
+
+[% IF bug.missing_sec_approval %]
+ <tr class="bz_attach_footer">
+ <td colspan="[% show_attachment_flags ? 3 : 2 %]" id="sec-approval-warning" class="attachment-warning">
+ <img src="extensions/BMO/web/images/sign_warning.png" width="16" height="16">
+ <a href="https://wiki.mozilla.org/Security/Bug_Approval_Process" target="_blank">
+ sec-approval required on patches before landing
+ </a>
+ </td>
+ </tr>
+[% END %]
diff --git a/extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl b/extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl
index b00eabc1f..5242f47b4 100644
--- a/extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl
@@ -7,10 +7,22 @@
#%]
[%
- RETURN UNLESS user.in_group('editbugs');
- RETURN UNLESS bug.attachments.size && bug.is_unassigned && bug.has_current_patch;
+ RETURN UNLESS user.in_group('editbugs') || bug.assigned_to.id == user.id;
+ RETURN UNLESS bug.attachments.size && bug.has_current_patch;
%]
-<div id="unassigned_with_patches">
- <img src="extensions/BMO/web/images/sign_warning.png" width="16" height="16">
- Unassigned [% terms.bug %] with patches attached
-</div>
+
+[% IF bug.is_unassigned %]
+ <div class="attachment-warning">
+ <img src="extensions/BMO/web/images/sign_warning.png" width="16" height="16">
+ Unassigned [% terms.bug %] with patches attached
+ </div>
+[% END %]
+
+[% IF bug.missing_sec_approval %]
+ <div id="sec-approval-warning" class="attachment-warning">
+ <img src="extensions/BMO/web/images/sign_warning.png" width="16" height="16">
+ <a href="https://wiki.mozilla.org/Security/Bug_Approval_Process" target="_blank">
+ sec-approval required on patches before landing
+ </a>
+ </div>
+[% END %]