summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/BMO/Extension.pm6
-rw-r--r--extensions/BMO/template/en/default/hook/bug/show-header-end.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/hook/global/user-error-auth_failure_object.html.tmpl2
3 files changed, 8 insertions, 2 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index d6839b2a7..5ada4eb72 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -198,7 +198,11 @@ sub page_before_template {
sub bounty_attachment {
my ($vars) = @_;
- ThrowUserError('user_not_insider') unless Bugzilla->user->is_insider;
+
+ Bugzilla->user->in_group('bounty-team')
+ || ThrowUserError("auth_failure", { group => "bounty-team",
+ action => "add",
+ object => "bounty_attachments" });
my $input = Bugzilla->input_params;
my $dbh = Bugzilla->dbh;
diff --git a/extensions/BMO/template/en/default/hook/bug/show-header-end.html.tmpl b/extensions/BMO/template/en/default/hook/bug/show-header-end.html.tmpl
index ff2438ffd..b7ce8675e 100644
--- a/extensions/BMO/template/en/default/hook/bug/show-header-end.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/bug/show-header-end.html.tmpl
@@ -8,7 +8,7 @@
[% style_urls.push('extensions/BMO/web/styles/edit_bug.css') %]
[% javascript_urls.push('extensions/BMO/web/js/edit_bug.js') %]
-[% IF user.is_insider %]
+[% IF user.in_group('bounty-team') %]
[% javascript_urls.push('extensions/BMO/web/js/attachment_bounty_form.js') %]
[% yui.push('selector') %]
[% END %]
diff --git a/extensions/BMO/template/en/default/hook/global/user-error-auth_failure_object.html.tmpl b/extensions/BMO/template/en/default/hook/global/user-error-auth_failure_object.html.tmpl
index bf46ed895..7fae9d1b0 100644
--- a/extensions/BMO/template/en/default/hook/global/user-error-auth_failure_object.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/global/user-error-auth_failure_object.html.tmpl
@@ -14,4 +14,6 @@
the product security report
[% ELSIF object == 'comments' %]
comments
+[% ELSIF object == 'bounty_attachments' %]
+ bounty attachments
[% END %]