From 6f3e5c8018709ef5a43427c5259e24372eefe7c3 Mon Sep 17 00:00:00 2001 From: "terry%netscape.com" <> Date: Fri, 12 Mar 1999 00:30:51 +0000 Subject: 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. --- buglist.cgi | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'buglist.cgi') diff --git a/buglist.cgi b/buglist.cgi index 8308bb940..b5f5e1608 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -177,12 +177,14 @@ my $dotweak = defined $::FORM{'tweak'}; if ($dotweak) { confirm_login(); +} else { + quietly_check_login(); } print "Content-type: text/html\n\n"; -my $query = "select bugs.bug_id"; +my $query = "select bugs.bug_id, bugs.groupset"; foreach my $c (@collist) { @@ -210,6 +212,7 @@ where bugs.assigned_to = assign.userid and bugs.reporter = report.userid and bugs.product = projector.program and bugs.version = projector.value +and bugs.groupset & $::usergroupset = bugs.groupset "; if ((defined $::FORM{'emailcc1'} && $::FORM{'emailcc1'}) || @@ -439,9 +442,19 @@ my %seen; my @bugarray; my %prodhash; my %statushash; +my $buggroupset = ""; while (@row = FetchSQLData()) { my $bug_id = shift @row; + my $g = shift @row; # Bug's group set. + if ($buggroupset eq "") { + $buggroupset = $g; + } elsif ($buggroupset ne $g) { + $buggroupset = "x"; # We only play games with tweaking the + # buggroupset if all the bugs have exactly + # the same group. If they don't, we leave + # it alone. + } if (!defined $seen{$bug_id}) { $seen{$bug_id} = 1; $count++; @@ -627,6 +640,23 @@ document.write(\"
"; +if ($::usergroupset ne '0' && $buggroupset =~ /^\d*$/) { + SendSQL("select bit, description, (bit & $buggroupset != 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 "
\n"; + } +} + + + + # knum is which knob number we're generating, in javascript terms. my $knum = 0; -- cgit v1.2.3-24-g4f1b