From fdfcfb96fd2461ad7bb5a195b8cd00090ef2d536 Mon Sep 17 00:00:00 2001 From: "bbaetz%student.usyd.edu.au" Date: Wed, 13 Feb 2002 03:05:15 +0000 Subject: [PATCH] Bug 97471 - The assignee and qa contact should always be able to see their bugs r=justdave, afranke --- webtools/bugzilla/bug_form.pl | 18 +++++++++--------- webtools/bugzilla/checksetup.pl | 17 +++++++++++++---- webtools/bugzilla/globals.pl | 7 ++----- webtools/bugzilla/process_bug.cgi | 10 +--------- 4 files changed, 25 insertions(+), 27 deletions(-) diff --git a/webtools/bugzilla/bug_form.pl b/webtools/bugzilla/bug_form.pl index 76c7cc242288..edf6fdfe89e1 100644 --- a/webtools/bugzilla/bug_form.pl +++ b/webtools/bugzilla/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|

But users in the roles selected below can always view this bug:
- (Does not take effect unless the bug is restricted to at least one group.) + (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.)

Reporter - Assignee - QA Contact CC List

|; diff --git a/webtools/bugzilla/checksetup.pl b/webtools/bugzilla/checksetup.pl index 05dcc8607b6d..97b5d471f2a5 100755 --- a/webtools/bugzilla/checksetup.pl +++ b/webtools/bugzilla/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/webtools/bugzilla/globals.pl b/webtools/bugzilla/globals.pl index e1f3302f3d7e..e6bd2d704650 100644 --- a/webtools/bugzilla/globals.pl +++ b/webtools/bugzilla/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/webtools/bugzilla/process_bug.cgi b/webtools/bugzilla/process_bug.cgi index 15daf152b117..f2abb039048a 100755 --- a/webtools/bugzilla/process_bug.cgi +++ b/webtools/bugzilla/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'} ) { @@ -607,14 +607,6 @@ if ( $::FORM{'id'} ) { $::FORM{'reporter_accessible'} = $::FORM{'reporter_accessible'} ? '1' : '0'; $::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'}";