]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1136745: Kill the makeproductgroups parameter
authorGervase Markham <gerv@mozilla.org>
Thu, 19 Mar 2015 19:40:07 +0000 (20:40 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 19 Mar 2015 19:45:19 +0000 (20:45 +0100)
r=LpSolit a=glob

Bugzilla/Config.pm
Bugzilla/Config/GroupSecurity.pm
Bugzilla/Product.pm
docs/en/rst/administering/parameters.rst
docs/en/rst/administering/users.rst
editgroups.cgi
template/en/default/admin/groups/create.html.tmpl
template/en/default/admin/params/groupsecurity.html.tmpl

index 5a8117c2986b60b8f19a568f5dbfe9f3783f6f5d..ebd5f8ef6c4a61ee2ce610ec41f83ea5ddd5ae3c 100644 (file)
@@ -151,14 +151,6 @@ sub update_params {
         $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
     if (exists $param->{'useLDAP'} && !exists $param->{'loginmethod'}) {
         $new_params{'loginmethod'} = $param->{'useLDAP'} ? "LDAP" : "DB";
index 4fa21e72f42b392b772901b5a4ba7c6ca399e7ed..ec172216b19c5df61b875030838f55940a5f0d76 100644 (file)
@@ -20,12 +20,6 @@ sub get_param_list {
   my $class = shift;
 
   my @param_list = (
-  {
-   name => 'makeproductgroups',
-   type => 'b',
-   default => 0
-  },
-
   {
    name => 'chartgroup',
    type => 's',
index 0c0cb458d554b2def12164e35d848d8a4c9583de..09ca61c69cdfc0c13f0622fe5db59b4091814a7f 100644 (file)
@@ -96,7 +96,6 @@ sub create {
                                   product => $product });
 
     # Create groups and series for the new product, if requested.
-    $product->_create_bug_group() if Bugzilla->params->{'makeproductgroups'};
     $product->_create_series() if $create_series;
 
     Bugzilla::Hook::process('product_end_of_create', { product => $product });
@@ -430,27 +429,6 @@ use constant is_default => 0;
 ####       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 {
     my $self = shift;
 
index e7ff00132b2b262cf9321af4dfc5f0048856bacb..44eae8e51e818c694ba0b52e30745f54ff3d2890 100644 (file)
@@ -360,11 +360,6 @@ The options on this page control global default behavior.
 For more information on Groups and Group Security, see
 :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
     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.
 
index b8657e5d9d0a0d446835e3aaeef3763eecb3b99a..e32db2f053c40a8db324fc744fd8a4c355380063 100644 (file)
@@ -144,15 +144,7 @@ fields:
 
 - *<productname>*:
   This allows an administrator to specify the products
-  in which a user can see bugs. If you turn on the
-  :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.
+  in which a user can see bugs.
 
 .. _createnewusers:
 
index 287ac11142a66eeea0720a719a62cecdf2114106..e39eb6c87ca23fb77f46cb5bc624642ebd2335dc 100755 (executable)
@@ -196,7 +196,7 @@ if ($action eq 'new') {
         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')) {
         $dbh->do('INSERT INTO group_control_map
                   (group_id, product_id, membercontrol, othercontrol)
index 3827fb0e32d1e9446a3b001bb25216d6e7173674..6f280d68d9a76d555c5d460a50faf986a11bad89 100644 (file)
@@ -42,8 +42,7 @@
     [% Hook.process('field') %]
   </table>
 
-  <input type="checkbox" id="insertnew" name="insertnew" value="1"
-    [% IF Param("makeproductgroups") %] checked[% END %]>
+  <input type="checkbox" id="insertnew" name="insertnew" value="1">
   <label for="insertnew">Insert new group into all existing products.</label>
   <p>
   <input type="submit" id="create" value="Add">
@@ -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
 case you should leave this checked.</b></p>
 
-[% IF Param("makeproductgroups") %]
-  <p>By default, the new group will be associated with existing products.
-  Unchecking the "Insert new group into all existing products" option will
-  prevent this and make the group become visible only when its controls have
-  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>Checking the "Insert new group into all existing products" option will
+make the new group available to be set on [% terms.bugs %] in all existing
+products. Leaving it unchecked means you need to specifically add the group to
+any product where you want it to be available for use.</p>
 
 <p>Back to the <a href="editgroups.cgi">group list</a>.</p>
 
index 19d78de5a63e9df9cc2807b19fe886ab67f32fa3..426dbd8f70808d86b62fed13db0e975770af455a 100644 (file)
@@ -11,9 +11,6 @@
 %]
 
 [% 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' " _
                 "feature. Administrators should ensure that the public categories " _
                 "and series definitions do not divulge confidential information " _