diff options
author | terry%netscape.com <> | 1999-03-12 01:30:51 +0100 |
---|---|---|
committer | terry%netscape.com <> | 1999-03-12 01:30:51 +0100 |
commit | 6f3e5c8018709ef5a43427c5259e24372eefe7c3 (patch) | |
tree | b2cbd1c250a035299e5bde3402aa1a0aa26b6492 /buglist.cgi | |
parent | 5b2ed378cc135b0f3b94d960824c65e43365e247 (diff) | |
download | bugzilla-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 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 32 |
1 files changed, 31 insertions, 1 deletions
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(\" <input type=button value=\\\"Uncheck All\\\" onclick=\\\"SetCh <BR> <TEXTAREA WRAP=HARD NAME=comment ROWS=5 COLS=80></TEXTAREA><BR>"; +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 "<select name=bit-$bit><option value=0$check0>\n"; + print "People not in the \"$description\" group can see these bugs\n"; + print "<option value=1$check1>\n"; + print "Only people in the \"$description\" group can see these bugs\n"; + print "</select><br>\n"; + } +} + + + + # knum is which knob number we're generating, in javascript terms. my $knum = 0; |