aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/AttachmentFilter/Extension.pm1
-rw-r--r--template/en/default/global/user-error.html.tmpl6
2 files changed, 6 insertions, 1 deletions
diff --git a/extensions/AttachmentFilter/Extension.pm b/extensions/AttachmentFilter/Extension.pm
index 1d316901e..a56f7ca77 100644
--- a/extensions/AttachmentFilter/Extension.pm
+++ b/extensions/AttachmentFilter/Extension.pm
@@ -23,6 +23,7 @@ sub attachment_process_data {
${$args->{data}} = '';
$args->{attributes}->{filename} = '';
+ ThrowUserError("illegal_html_attachment");
}
__PACKAGE__->NAME;
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index cc1ad1994..63655b926 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -903,7 +903,11 @@
[% title = "Unauthorized Action" %]
You are not authorized to edit attachments on [% terms.bug %]
[%+ bug_id FILTER html %].
-
+
+ [% ELSIF error == "illegal_html_attachment" %]
+ [% title = "Unauthorized Action" %]
+ You are not authorized to add html attachments.
+
[% ELSIF error == "illegal_bug_status_transition" %]
[% title = "Illegal $terms.Bug Status Change" %]
[% IF old.defined %]