$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";
my $class = shift;
my @param_list = (
- {
- name => 'makeproductgroups',
- type => 'b',
- default => 0
- },
-
{
name => 'chartgroup',
type => 's',
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 });
#### 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;
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.
- *<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:
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)
[% 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">
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>
%]
[% 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 " _