]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 97471 - The assignee and qa contact should always be able to see their
authorbbaetz%student.usyd.edu.au <>
Wed, 13 Feb 2002 11:05:13 +0000 (11:05 +0000)
committerbbaetz%student.usyd.edu.au <>
Wed, 13 Feb 2002 11:05:13 +0000 (11:05 +0000)
bugs
r=justdave, afranke

bug_form.pl
checksetup.pl
globals.pl
process_bug.cgi

index 76c7cc24228853202ada74edd6b67282513f04f6..edf6fdfe89e18cc523694de727d8c1810a725af9 100644 (file)
@@ -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>
         |;
index 05dcc8607b6d71ff09fe76b60b139d2e41439a1c..97b5d471f2a50e8b54d1897edd293aff2cf28070 100755 (executable)
@@ -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.
 #
index e1f3302f3d7ef08556161c914912c3848f033fd9..e6bd2d7046500777a7f6798350727983c898e684 100644 (file)
@@ -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))";
     }
 
index 15daf152b117b86fb634b3c7f00058d53c4150bb..f2abb039048a5236649ffbbec78512ac02315d5c 100755 (executable)
@@ -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'}";