diff options
-rw-r--r-- | bug_form.pl | 18 | ||||
-rwxr-xr-x | checksetup.pl | 17 | ||||
-rw-r--r-- | globals.pl | 7 | ||||
-rwxr-xr-x | process_bug.cgi | 10 |
4 files changed, 25 insertions, 27 deletions
diff --git a/bug_form.pl b/bug_form.pl index 76c7cc242..edf6fdfe8 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -430,38 +430,38 @@ if ($::usergroupset ne '0' || $bug{'groupset'} ne '0') { } # If the bug is restricted to a group, display checkboxes that allow - # the user to set whether or not the reporter, assignee, QA contact, + # the user to set whether or not the reporter # and cc list can see the bug even if they are not members of all # groups to which the bug is restricted. if ( $bug{'groupset'} != 0 ) { # Determine whether or not the bug is always accessible by the reporter, # QA contact, and/or users on the cc: list. - SendSQL("SELECT reporter_accessible , assignee_accessible , - qacontact_accessible , cclist_accessible + SendSQL("SELECT reporter_accessible, cclist_accessible FROM bugs WHERE bug_id = $id "); - my ($reporter_accessible, $assignee_accessible, $qacontact_accessible, $cclist_accessible) = FetchSQLData(); + my ($reporter_accessible, $cclist_accessible) = FetchSQLData(); # Convert boolean data about which roles always have access to the bug # into "checked" attributes for the HTML checkboxes by which users # set and change these values. my $reporter_checked = $reporter_accessible ? " checked" : ""; - my $assignee_checked = $assignee_accessible ? " checked" : ""; - my $qacontact_checked = $qacontact_accessible ? " checked" : ""; my $cclist_checked = $cclist_accessible ? " checked" : ""; # Display interface for changing the values. print qq| <p> <b>But users in the roles selected below can always view this bug:</b><br> - <small>(Does not take effect unless the bug is restricted to at least one group.)</small> + <small>(The assignee + |; + if (Param('useqacontact')) { + print " and qa contact"; + } + print qq| can always see a bug, and this does not take effect unless the bug is restricted to at least one group.)</small> </p> <p> <input type="checkbox" name="reporter_accessible" value="1" $reporter_checked>Reporter - <input type="checkbox" name="assignee_accessible" value="1" $assignee_checked>Assignee - <input type="checkbox" name="qacontact_accessible" value="1" $qacontact_checked>QA Contact <input type="checkbox" name="cclist_accessible" value="1" $cclist_checked>CC List </p> |; diff --git a/checksetup.pl b/checksetup.pl index 05dcc8607..97b5d471f 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -1028,8 +1028,6 @@ $table{bugs} = lastdiffed datetime not null, everconfirmed tinyint not null, reporter_accessible tinyint not null default 1, - assignee_accessible tinyint not null default 1, - qacontact_accessible tinyint not null default 1, cclist_accessible tinyint not null default 1, index (assigned_to), @@ -2627,9 +2625,10 @@ ChangeFieldType("profiles", "disabledtext", "mediumtext not null"); # Add fields to the bugs table that record whether or not the reporter, # assignee, QA contact, and users on the cc: list can see bugs even when # they are not members of groups to which the bugs are restricted. +# 2002-02-06 bbaetz@student.usyd.edu.au - assignee/qa can always see the bug AddField("bugs", "reporter_accessible", "tinyint not null default 1"); -AddField("bugs", "assignee_accessible", "tinyint not null default 1"); -AddField("bugs", "qacontact_accessible", "tinyint not null default 1"); +#AddField("bugs", "assignee_accessible", "tinyint not null default 1"); +#AddField("bugs", "qacontact_accessible", "tinyint not null default 1"); AddField("bugs", "cclist_accessible", "tinyint not null default 1"); # 2001-08-21 myk@mozilla.org bug84338: @@ -2660,6 +2659,16 @@ if (GetFieldDef("logincookies", "cryptpassword")) { DropField("logincookies", "cryptpassword"); } +# 2002-02-13 bbaetz@student.usyd.edu.au - bug 97471 +# qacontact/assignee should always be able to see bugs, +# so remove their restriction column +if (GetFieldDef("bugs","qacontact_accessible")) { + print "Removing restrictions on bugs for assignee and qacontact...\n"; + + DropField("bugs", "qacontact_accessible"); + DropField("bugs", "assignee_accessible"); +} + # If you had to change the --TABLE-- definition in any way, then add your # differential change code *** A B O V E *** this comment. # diff --git a/globals.pl b/globals.pl index e1f3302f3..e6bd2d704 100644 --- a/globals.pl +++ b/globals.pl @@ -776,9 +776,8 @@ sub SelectVisible { # and is authorized to access the bug. # A user is also authorized to access a bug if she is the reporter, - # assignee, QA contact, or member of the cc: list of the bug and the bug - # allows users in those roles to see the bug. The boolean fields - # reporter_accessible, assignee_accessible, qacontact_accessible, and + # or member of the cc: list of the bug and the bug allows users in those + # roles to see the bug. The boolean fields reporter_accessible and # cclist_accessible identify whether or not those roles can see the bug. # Bit arithmetic is performed by MySQL instead of Perl because bitset @@ -803,8 +802,6 @@ sub SelectVisible { # test to the JOINed cc table. See http://lists.mysql.com/cgi-ez/ezmlm-cgi?9:mss:11417 # Its needed, even though it shouldn't be $replace .= "OR (bugs.reporter_accessible = 1 AND bugs.reporter = $userid) - OR (bugs.assignee_accessible = 1 AND bugs.assigned_to = $userid) - OR (bugs.qacontact_accessible = 1 AND bugs.qa_contact = $userid) OR (bugs.cclist_accessible = 1 AND selectVisible_cc.who = $userid AND not isnull(selectVisible_cc.who))"; } diff --git a/process_bug.cgi b/process_bug.cgi index 15daf152b..f2abb0390 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -596,7 +596,7 @@ if (defined $::FORM{'qa_contact'}) { # If the user is submitting changes from show_bug.cgi for a single bug, # and that bug is restricted to a group, process the checkboxes that -# allowed the user to set whether or not the reporter, assignee, QA contact, +# allowed the user to set whether or not the reporter # and cc list can see the bug even if they are not members of all groups # to which the bug is restricted. if ( $::FORM{'id'} ) { @@ -608,14 +608,6 @@ if ( $::FORM{'id'} ) { $::query .= "reporter_accessible = $::FORM{'reporter_accessible'}"; DoComma(); - $::FORM{'assignee_accessible'} = $::FORM{'assignee_accessible'} ? '1' : '0'; - $::query .= "assignee_accessible = $::FORM{'assignee_accessible'}"; - - DoComma(); - $::FORM{'qacontact_accessible'} = $::FORM{'qacontact_accessible'} ? '1' : '0'; - $::query .= "qacontact_accessible = $::FORM{'qacontact_accessible'}"; - - DoComma(); $::FORM{'cclist_accessible'} = $::FORM{'cclist_accessible'} ? '1' : '0'; $::query .= "cclist_accessible = $::FORM{'cclist_accessible'}"; } |