diff options
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Config.pm | 4 | ||||
-rw-r--r-- | Bugzilla/Config/GroupSecurity.pm | 6 | ||||
-rw-r--r-- | Bugzilla/DB/Schema.pm | 6 | ||||
-rw-r--r-- | Bugzilla/Install/DB.pm | 25 | ||||
-rw-r--r-- | Bugzilla/Product.pm | 7 | ||||
-rw-r--r-- | Bugzilla/User.pm | 10 |
6 files changed, 23 insertions, 35 deletions
diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm index 14f10bed9..4074abcd1 100644 --- a/Bugzilla/Config.pm +++ b/Bugzilla/Config.pm @@ -151,10 +151,6 @@ sub update_params { { $param->{'makeproductgroups'} = $param->{'usebuggroups'}; } - if (exists $param->{'usebuggroupsentry'} - && !exists $param->{'useentrygroupdefault'}) { - $param->{'useentrygroupdefault'} = $param->{'usebuggroupsentry'}; - } # Modularise auth code if (exists $param->{'useLDAP'} && !exists $param->{'loginmethod'}) { diff --git a/Bugzilla/Config/GroupSecurity.pm b/Bugzilla/Config/GroupSecurity.pm index 0a238f209..f0038f153 100644 --- a/Bugzilla/Config/GroupSecurity.pm +++ b/Bugzilla/Config/GroupSecurity.pm @@ -49,12 +49,6 @@ sub get_param_list { }, { - name => 'useentrygroupdefault', - type => 'b', - default => 0 - }, - - { name => 'chartgroup', type => 's', choices => \&_get_all_group_names, diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 680f754ca..1afdb6598 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -1010,10 +1010,12 @@ use constant ABSTRACT_SCHEMA => { REFERENCES => {TABLE => 'products', COLUMN => 'id', DELETE => 'CASCADE'}}, - entry => {TYPE => 'BOOLEAN', NOTNULL => 1}, + entry => {TYPE => 'BOOLEAN', NOTNULL => 1, + DEFAULT => 'FALSE'}, membercontrol => {TYPE => 'BOOLEAN', NOTNULL => 1}, othercontrol => {TYPE => 'BOOLEAN', NOTNULL => 1}, - canedit => {TYPE => 'BOOLEAN', NOTNULL => 1}, + canedit => {TYPE => 'BOOLEAN', NOTNULL => 1, + DEFAULT => 'FALSE'}, editcomponents => {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'FALSE'}, editbugs => {TYPE => 'BOOLEAN', NOTNULL => 1, diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index ec6c8ce9c..de1d48361 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -557,7 +557,13 @@ sub update_table_definitions { # 2009-03-02 arbingersys@gmail.com - Bug 423613 $dbh->bz_add_index('profiles', 'profiles_extern_id_idx', {TYPE => 'UNIQUE', FIELDS => [qw(extern_id)]}); - + + # 2009-03-31 LpSolit@gmail.com - Bug 478972 + $dbh->bz_alter_column('group_control_map', 'entry', + {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'FALSE'}); + $dbh->bz_alter_column('group_control_map', 'canedit', + {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'FALSE'}); + ################################################################ # New --TABLE-- changes should go *** A B O V E *** this point # ################################################################ @@ -1840,7 +1846,6 @@ sub _setup_usebuggroups_backward_compatibility { # # If group_control_map is empty, backward-compatibility # usebuggroups-equivalent records should be created. - my $entry = Bugzilla->params->{'useentrygroupdefault'}; my ($maps_exist) = $dbh->selectrow_array( "SELECT DISTINCT 1 FROM group_control_map"); if (!$maps_exist) { @@ -1857,11 +1862,9 @@ sub _setup_usebuggroups_backward_compatibility { if ($groupname eq $productname) { # Product and group have same name. $dbh->do("INSERT INTO group_control_map " . - "(group_id, product_id, entry, membercontrol, " . - "othercontrol, canedit) " . - "VALUES ($groupid, $productid, $entry, " . - CONTROLMAPDEFAULT . ", " . - CONTROLMAPNA . ", 0)"); + "(group_id, product_id, membercontrol, othercontrol) " . + "VALUES (?, ?, ?, ?)", undef, + ($groupid, $productid, CONTROLMAPDEFAULT, CONTROLMAPNA)); } else { # See if this group is a product group at all. my $sth2 = $dbh->prepare("SELECT id FROM products @@ -1872,11 +1875,9 @@ sub _setup_usebuggroups_backward_compatibility { # If there is no product with the same name as this # group, then it is permitted for all products. $dbh->do("INSERT INTO group_control_map " . - "(group_id, product_id, entry, membercontrol, " . - "othercontrol, canedit) " . - "VALUES ($groupid, $productid, 0, " . - CONTROLMAPSHOWN . ", " . - CONTROLMAPNA . ", 0)"); + "(group_id, product_id, membercontrol, othercontrol) " . + "VALUES (?, ?, ?, ?)", undef, + ($groupid, $productid, CONTROLMAPSHOWN, CONTROLMAPNA)); } } } diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index 88292d27e..03ebe2639 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -565,10 +565,9 @@ sub _create_bug_group { # Associate the new group and new product. $dbh->do('INSERT INTO group_control_map - (group_id, product_id, entry, membercontrol, othercontrol, canedit) - VALUES (?, ?, ?, ?, ?, ?)', - undef, ($group->id, $self->id, Bugzilla->params->{'useentrygroupdefault'}, - CONTROLMAPDEFAULT, CONTROLMAPNA, 0)); + (group_id, product_id, membercontrol, othercontrol) + VALUES (?, ?, ?, ?)', + undef, ($group->id, $self->id, CONTROLMAPDEFAULT, CONTROLMAPNA)); } sub _create_series { diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index fe04856aa..d373f019d 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -658,13 +658,9 @@ sub get_selectable_products { my $query = "SELECT id " . " FROM products " . "LEFT JOIN group_control_map " . - " ON group_control_map.product_id = products.id "; - if (Bugzilla->params->{'useentrygroupdefault'}) { - $query .= " AND group_control_map.entry != 0 "; - } else { - $query .= " AND group_control_map.membercontrol = " . CONTROLMAPMANDATORY; - } - $query .= " AND group_id NOT IN(" . $self->groups_as_string . ") " . + "ON group_control_map.product_id = products.id " . + " AND group_control_map.membercontrol = " . CONTROLMAPMANDATORY . + " AND group_id NOT IN(" . $self->groups_as_string . ") " . " WHERE group_id IS NULL " . "ORDER BY name"; |