зеркало из https://github.com/mozilla/gecko-dev.git
Bug 97471 - The assignee and qa contact should always be able to see their
bugs r=justdave, afranke
This commit is contained in:
Родитель
3fe5966524
Коммит
fdfcfb96fd
|
@ -430,38 +430,38 @@ if ($::usergroupset ne '0' || $bug{'groupset'} ne '0') {
|
||||||
}
|
}
|
||||||
|
|
||||||
# If the bug is restricted to a group, display checkboxes that allow
|
# 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
|
# and cc list can see the bug even if they are not members of all
|
||||||
# groups to which the bug is restricted.
|
# groups to which the bug is restricted.
|
||||||
if ( $bug{'groupset'} != 0 ) {
|
if ( $bug{'groupset'} != 0 ) {
|
||||||
# Determine whether or not the bug is always accessible by the reporter,
|
# Determine whether or not the bug is always accessible by the reporter,
|
||||||
# QA contact, and/or users on the cc: list.
|
# QA contact, and/or users on the cc: list.
|
||||||
SendSQL("SELECT reporter_accessible , assignee_accessible ,
|
SendSQL("SELECT reporter_accessible, cclist_accessible
|
||||||
qacontact_accessible , cclist_accessible
|
|
||||||
FROM bugs
|
FROM bugs
|
||||||
WHERE bug_id = $id
|
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
|
# Convert boolean data about which roles always have access to the bug
|
||||||
# into "checked" attributes for the HTML checkboxes by which users
|
# into "checked" attributes for the HTML checkboxes by which users
|
||||||
# set and change these values.
|
# set and change these values.
|
||||||
my $reporter_checked = $reporter_accessible ? " checked" : "";
|
my $reporter_checked = $reporter_accessible ? " checked" : "";
|
||||||
my $assignee_checked = $assignee_accessible ? " checked" : "";
|
|
||||||
my $qacontact_checked = $qacontact_accessible ? " checked" : "";
|
|
||||||
my $cclist_checked = $cclist_accessible ? " checked" : "";
|
my $cclist_checked = $cclist_accessible ? " checked" : "";
|
||||||
|
|
||||||
# Display interface for changing the values.
|
# Display interface for changing the values.
|
||||||
print qq|
|
print qq|
|
||||||
<p>
|
<p>
|
||||||
<b>But users in the roles selected below can always view this bug:</b><br>
|
<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>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<input type="checkbox" name="reporter_accessible" value="1" $reporter_checked>Reporter
|
<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
|
<input type="checkbox" name="cclist_accessible" value="1" $cclist_checked>CC List
|
||||||
</p>
|
</p>
|
||||||
|;
|
|;
|
||||||
|
|
|
@ -1028,8 +1028,6 @@ $table{bugs} =
|
||||||
lastdiffed datetime not null,
|
lastdiffed datetime not null,
|
||||||
everconfirmed tinyint not null,
|
everconfirmed tinyint not null,
|
||||||
reporter_accessible tinyint not null default 1,
|
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,
|
cclist_accessible tinyint not null default 1,
|
||||||
|
|
||||||
index (assigned_to),
|
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,
|
# 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
|
# 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.
|
# 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", "reporter_accessible", "tinyint not null default 1");
|
||||||
AddField("bugs", "assignee_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", "qacontact_accessible", "tinyint not null default 1");
|
||||||
AddField("bugs", "cclist_accessible", "tinyint not null default 1");
|
AddField("bugs", "cclist_accessible", "tinyint not null default 1");
|
||||||
|
|
||||||
# 2001-08-21 myk@mozilla.org bug84338:
|
# 2001-08-21 myk@mozilla.org bug84338:
|
||||||
|
@ -2660,6 +2659,16 @@ if (GetFieldDef("logincookies", "cryptpassword")) {
|
||||||
DropField("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
|
# If you had to change the --TABLE-- definition in any way, then add your
|
||||||
# differential change code *** A B O V E *** this comment.
|
# differential change code *** A B O V E *** this comment.
|
||||||
#
|
#
|
||||||
|
|
|
@ -776,9 +776,8 @@ sub SelectVisible {
|
||||||
# and is authorized to access the bug.
|
# and is authorized to access the bug.
|
||||||
|
|
||||||
# A user is also authorized to access a bug if she is the reporter,
|
# 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
|
# or member of the cc: list of the bug and the bug allows users in those
|
||||||
# allows users in those roles to see the bug. The boolean fields
|
# roles to see the bug. The boolean fields reporter_accessible and
|
||||||
# reporter_accessible, assignee_accessible, qacontact_accessible, and
|
|
||||||
# cclist_accessible identify whether or not those roles can see the bug.
|
# cclist_accessible identify whether or not those roles can see the bug.
|
||||||
|
|
||||||
# Bit arithmetic is performed by MySQL instead of Perl because bitset
|
# 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
|
# 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
|
# Its needed, even though it shouldn't be
|
||||||
$replace .= "OR (bugs.reporter_accessible = 1 AND bugs.reporter = $userid)
|
$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))";
|
OR (bugs.cclist_accessible = 1 AND selectVisible_cc.who = $userid AND not isnull(selectVisible_cc.who))";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -596,7 +596,7 @@ if (defined $::FORM{'qa_contact'}) {
|
||||||
|
|
||||||
# If the user is submitting changes from show_bug.cgi for a single bug,
|
# 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
|
# 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
|
# and cc list can see the bug even if they are not members of all groups
|
||||||
# to which the bug is restricted.
|
# to which the bug is restricted.
|
||||||
if ( $::FORM{'id'} ) {
|
if ( $::FORM{'id'} ) {
|
||||||
|
@ -607,14 +607,6 @@ if ( $::FORM{'id'} ) {
|
||||||
$::FORM{'reporter_accessible'} = $::FORM{'reporter_accessible'} ? '1' : '0';
|
$::FORM{'reporter_accessible'} = $::FORM{'reporter_accessible'} ? '1' : '0';
|
||||||
$::query .= "reporter_accessible = $::FORM{'reporter_accessible'}";
|
$::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();
|
DoComma();
|
||||||
$::FORM{'cclist_accessible'} = $::FORM{'cclist_accessible'} ? '1' : '0';
|
$::FORM{'cclist_accessible'} = $::FORM{'cclist_accessible'} ? '1' : '0';
|
||||||
$::query .= "cclist_accessible = $::FORM{'cclist_accessible'}";
|
$::query .= "cclist_accessible = $::FORM{'cclist_accessible'}";
|
||||||
|
|
Загрузка…
Ссылка в новой задаче