File tree Expand file tree Collapse file tree 3 files changed +32
-5
lines changed
extensions/BMO/template/en/default/hook/bug Expand file tree Collapse file tree 3 files changed +32
-5
lines changed Original file line number Diff line number Diff line change @@ -2915,11 +2915,11 @@ sub add_group {
2915
2915
# If the bug is already in this group, then there is nothing to do.
2916
2916
return if $self -> in_group($group );
2917
2917
2918
-
2919
2918
# BMO : allow bugs to be always placed into some groups by the bug's
2920
- # reporter
2921
- if ($self -> {reporter_id } != Bugzilla-> user-> id
2922
- || !$self -> product_obj-> group_always_settable($group ))
2919
+ # reporter, or by users with editbugs
2920
+ my $user = Bugzilla-> user;
2921
+ if (!$self -> product_obj-> group_always_settable($group )
2922
+ || ($self -> {reporter_id } != $user -> id && !$user -> in_group(' editbugs' )))
2923
2923
{
2924
2924
# Make sure that bugs in this product can actually be restricted
2925
2925
# to this group by the current user.
@@ -2928,7 +2928,7 @@ sub add_group {
2928
2928
2929
2929
# OtherControl people can add groups only during a product change,
2930
2930
# and only when the group is not NA for them.
2931
- if (!Bugzilla -> user-> in_group($group -> name)) {
2931
+ if (!$ user-> in_group($group -> name)) {
2932
2932
my $controls = $self -> product_obj-> group_controls-> {$group -> id};
2933
2933
if (!$self -> {_old_product_name }
2934
2934
|| $controls -> {othercontrol } == CONTROLMAPNA)
Original file line number Diff line number Diff line change
1
+ [%# This Source Code Form is subject to the terms of the Mozilla Public
2
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
+ #
5
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
6
+ # defined by the Mozilla Public License, v. 2.0.
7
+ #%]
8
+
9
+ [% RETURN IF
10
+ bug.in_group(bug.product_obj.default_security_group_obj)
11
+ || user.in_group(bug.product_obj.default_security_group)
12
+ || (user.id != bug.reporter.id && !user.in_group('editbugs'))
13
+ %]
14
+
15
+ <div class="bz_group_visibility_section">
16
+ <input type="checkbox" name="groups"
17
+ value="[% bug.product_obj.default_security_group FILTER none %]"
18
+ id="group_[% bug.product_obj.default_security_group_obj.id FILTER html %]"
19
+ onchange="if (this.checked) document.getElementById('addselfcc').checked = true"
20
+ >
21
+ <label for="group_[% bug.product_obj.default_security_group_obj.id FILTER html %]"
22
+ title="This [% terms.bug %] is security sensitive and should be hidden from the public until it is resolved">
23
+ Restrict access to this [% terms.bug %]
24
+ </label>
25
+ </div><br>
Original file line number Diff line number Diff line change 200
200
[% END %]
201
201
</td>
202
202
<td>
203
+ [%# BMO hook for adding custom group visibility %]
204
+ [% Hook.process('before_restrict_visibility', 'bug/edit.html.tmpl') %]
203
205
[% PROCESS section_restrict_visibility %]
204
206
</td>
205
207
</tr></table>
You can’t perform that action at this time.
0 commit comments