Commit 5c8594a7 authored by Gervase Markham's avatar Gervase Markham Committed by Frédéric Buclin

Bug 1136745: Kill the makeproductgroups parameter

r=LpSolit a=glob
parent 42584a88
...@@ -151,14 +151,6 @@ sub update_params { ...@@ -151,14 +151,6 @@ sub update_params {
$new_params{'enablequips'} = $param->{'usequip'} ? 'on' : 'off'; $new_params{'enablequips'} = $param->{'usequip'} ? 'on' : 'off';
} }
# Change from old product groups to controls for group_control_map
# 2002-10-14 bug 147275 bugreport@peshkin.net
if (exists $param->{'usebuggroups'} &&
!exists $param->{'makeproductgroups'})
{
$new_params{'makeproductgroups'} = $param->{'usebuggroups'};
}
# Modularise auth code # Modularise auth code
if (exists $param->{'useLDAP'} && !exists $param->{'loginmethod'}) { if (exists $param->{'useLDAP'} && !exists $param->{'loginmethod'}) {
$new_params{'loginmethod'} = $param->{'useLDAP'} ? "LDAP" : "DB"; $new_params{'loginmethod'} = $param->{'useLDAP'} ? "LDAP" : "DB";
......
...@@ -21,12 +21,6 @@ sub get_param_list { ...@@ -21,12 +21,6 @@ sub get_param_list {
my @param_list = ( my @param_list = (
{ {
name => 'makeproductgroups',
type => 'b',
default => 0
},
{
name => 'chartgroup', name => 'chartgroup',
type => 's', type => 's',
choices => \&_get_all_group_names, choices => \&_get_all_group_names,
......
...@@ -96,7 +96,6 @@ sub create { ...@@ -96,7 +96,6 @@ sub create {
product => $product }); product => $product });
# Create groups and series for the new product, if requested. # Create groups and series for the new product, if requested.
$product->_create_bug_group() if Bugzilla->params->{'makeproductgroups'};
$product->_create_series() if $create_series; $product->_create_series() if $create_series;
Bugzilla::Hook::process('product_end_of_create', { product => $product }); Bugzilla::Hook::process('product_end_of_create', { product => $product });
...@@ -430,27 +429,6 @@ use constant is_default => 0; ...@@ -430,27 +429,6 @@ use constant is_default => 0;
#### Methods #### #### Methods ####
############################### ###############################
sub _create_bug_group {
my $self = shift;
my $dbh = Bugzilla->dbh;
my $group_name = $self->name;
while (new Bugzilla::Group({name => $group_name})) {
$group_name .= '_';
}
my $group_description = get_text('bug_group_description', {product => $self});
my $group = Bugzilla::Group->create({name => $group_name,
description => $group_description,
isbuggroup => 1});
# Associate the new group and new product.
$dbh->do('INSERT INTO group_control_map
(group_id, product_id, membercontrol, othercontrol)
VALUES (?, ?, ?, ?)',
undef, ($group->id, $self->id, CONTROLMAPDEFAULT, CONTROLMAPNA));
}
sub _create_series { sub _create_series {
my $self = shift; my $self = shift;
......
...@@ -360,11 +360,6 @@ The options on this page control global default behavior. ...@@ -360,11 +360,6 @@ The options on this page control global default behavior.
For more information on Groups and Group Security, see For more information on Groups and Group Security, see
:ref:`groups`. :ref:`groups`.
makeproductgroups
Determines whether or not to automatically create groups
when new products are created. If this is on, the groups will be
used for querying bugs.
chartgroup chartgroup
The name of the group of users who can use the 'New Charts' feature. Administrators should ensure that the public categories and series definitions do not divulge confidential information before enabling this for an untrusted population. If left blank, no users will be able to use New Charts. The name of the group of users who can use the 'New Charts' feature. Administrators should ensure that the public categories and series definitions do not divulge confidential information before enabling this for an untrusted population. If left blank, no users will be able to use New Charts.
......
...@@ -144,15 +144,7 @@ fields: ...@@ -144,15 +144,7 @@ fields:
- *<productname>*: - *<productname>*:
This allows an administrator to specify the products This allows an administrator to specify the products
in which a user can see bugs. If you turn on the in which a user can see bugs.
:param:`makeproductgroups` parameter in
the Group Security Panel in the Parameters page,
then Bugzilla creates one group per product (at the time you create
the product), and this group has exactly the same name as the
product itself. Note that for products that already exist when
the parameter is turned on, the corresponding group will not be
created. The user must still have the :group:`editbugs`
privilege to edit bugs in these products.
.. _createnewusers: .. _createnewusers:
......
...@@ -196,7 +196,7 @@ if ($action eq 'new') { ...@@ -196,7 +196,7 @@ if ($action eq 'new') {
isbuggroup => 1, isbuggroup => 1,
}); });
# Permit all existing products to use the new group if makeproductgroups. # Permit all existing products to use the new group if requested.
if ($cgi->param('insertnew')) { if ($cgi->param('insertnew')) {
$dbh->do('INSERT INTO group_control_map $dbh->do('INSERT INTO group_control_map
(group_id, product_id, membercontrol, othercontrol) (group_id, product_id, membercontrol, othercontrol)
......
...@@ -42,8 +42,7 @@ ...@@ -42,8 +42,7 @@
[% Hook.process('field') %] [% Hook.process('field') %]
</table> </table>
<input type="checkbox" id="insertnew" name="insertnew" value="1" <input type="checkbox" id="insertnew" name="insertnew" value="1">
[% IF Param("makeproductgroups") %] checked[% END %]>
<label for="insertnew">Insert new group into all existing products.</label> <label for="insertnew">Insert new group into all existing products.</label>
<p> <p>
<input type="submit" id="create" value="Add"> <input type="submit" id="create" value="Add">
...@@ -82,17 +81,10 @@ than deleting the group would be. <b>Note: If you are creating ...@@ -82,17 +81,10 @@ than deleting the group would be. <b>Note: If you are creating
a group, you probably want it to be usable for [% terms.bugs %], in which a group, you probably want it to be usable for [% terms.bugs %], in which
case you should leave this checked.</b></p> case you should leave this checked.</b></p>
[% IF Param("makeproductgroups") %] <p>Checking the "Insert new group into all existing products" option will
<p>By default, the new group will be associated with existing products. make the new group available to be set on [% terms.bugs %] in all existing
Unchecking the "Insert new group into all existing products" option will products. Leaving it unchecked means you need to specifically add the group to
prevent this and make the group become visible only when its controls have any product where you want it to be available for use.</p>
been added to a product.</p>
[% ELSE %]
<p>Checking the "Insert new group into all existing products" option will
make the new group be associated with existing products. Leaving it unchecked
will make the group become visible only when its controls have been added to
a product.</p>
[% END %]
<p>Back to the <a href="editgroups.cgi">group list</a>.</p> <p>Back to the <a href="editgroups.cgi">group list</a>.</p>
......
...@@ -11,9 +11,6 @@ ...@@ -11,9 +11,6 @@
%] %]
[% param_descs = { [% param_descs = {
makeproductgroups => "If this is on, Bugzilla will associate $terms.abug group " _
"with each product in the database, and use it for querying ${terms.bugs}.",
chartgroup => "The name of the group of users who can use the 'New Charts' " _ chartgroup => "The name of the group of users who can use the 'New Charts' " _
"feature. Administrators should ensure that the public categories " _ "feature. Administrators should ensure that the public categories " _
"and series definitions do not divulge confidential information " _ "and series definitions do not divulge confidential information " _
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment