summaryrefslogtreecommitdiffstats
path: root/bug_form.pl
diff options
context:
space:
mode:
authorterry%netscape.com <>1999-03-12 01:30:51 +0100
committerterry%netscape.com <>1999-03-12 01:30:51 +0100
commit6f3e5c8018709ef5a43427c5259e24372eefe7c3 (patch)
treeb2cbd1c250a035299e5bde3402aa1a0aa26b6492 /bug_form.pl
parent5b2ed378cc135b0f3b94d960824c65e43365e247 (diff)
downloadbugzilla-6f3e5c8018709ef5a43427c5259e24372eefe7c3.tar.gz
bugzilla-6f3e5c8018709ef5a43427c5259e24372eefe7c3.tar.xz
Added 'groups' stuff, where we have different group bits that we can
put on a person or on a bug. Some of the group bits control access to bugzilla features. And a person can't access a bug unless he has every group bit set that is also set on the bug.
Diffstat (limited to 'bug_form.pl')
-rw-r--r--bug_form.pl32
1 files changed, 27 insertions, 5 deletions
diff --git a/bug_form.pl b/bug_form.pl
index d56d6b42a..cd2ff0e33 100644
--- a/bug_form.pl
+++ b/bug_form.pl
@@ -21,6 +21,8 @@
use diagnostics;
use strict;
+quietly_check_login();
+
my $query = "
select
bug_id,
@@ -40,9 +42,11 @@ select
target_milestone,
qa_contact,
status_whiteboard,
- date_format(creation_ts,'Y-m-d')
+ date_format(creation_ts,'Y-m-d'),
+ groupset
from bugs
-where bug_id = $::FORM{'id'}";
+where bug_id = $::FORM{'id'}
+and bugs.groupset & $::usergroupset = bugs.groupset";
SendSQL($query);
my %bug;
@@ -53,7 +57,8 @@ if (@row = FetchSQLData()) {
"op_sys", "bug_status", "resolution", "priority",
"bug_severity", "component", "assigned_to", "reporter",
"bug_file_loc", "short_desc", "target_milestone",
- "qa_contact", "status_whiteboard", "creation_ts") {
+ "qa_contact", "status_whiteboard", "creation_ts",
+ "groupset") {
$bug{$field} = shift @row;
if (!defined $bug{$field}) {
$bug{$field} = "";
@@ -212,11 +217,28 @@ print "
<br>
<B>Additional Comments:</B>
<BR>
-<TEXTAREA WRAP=HARD NAME=comment ROWS=5 COLS=80></TEXTAREA><BR>
-<br>
+<TEXTAREA WRAP=HARD NAME=comment ROWS=5 COLS=80></TEXTAREA><BR>";
+
+
+if ($::usergroupset ne '0') {
+ SendSQL("select bit, description, (bit & $bug{'groupset'} != 0) from groups where bit & $::usergroupset != 0 and isbuggroup != 0 order by bit");
+ while (MoreSQLData()) {
+ my ($bit, $description, $ison) = (FetchSQLData());
+ my $check0 = !$ison ? " SELECTED" : "";
+ my $check1 = $ison ? " SELECTED" : "";
+ print "<select name=bit-$bit><option value=0$check0>\n";
+ print "People not in the \"$description\" group can see this bug\n";
+ print "<option value=1$check1>\n";
+ print "Only people in the \"$description\" group can see this bug\n";
+ print "</select><br>\n";
+ }
+}
+
+print "<br>
<INPUT TYPE=radio NAME=knob VALUE=none CHECKED>
Leave as <b>$bug{'bug_status'} $bug{'resolution'}</b><br>";
+
# knum is which knob number we're generating, in javascript terms.
my $knum = 1;