diff options
author | terry%mozilla.org <> | 2000-02-17 14:15:20 +0100 |
---|---|---|
committer | terry%mozilla.org <> | 2000-02-17 14:15:20 +0100 |
commit | e9a32920f47ce268e3835b12abccc9fb2e1dd8c6 (patch) | |
tree | 8f1154745b807d4dee480e7b5c22d3ccb4b27f07 /userprefs.cgi | |
parent | 3c0ea11d42d7942f36e1704afefc55655811db5d (diff) | |
download | bugzilla-e9a32920f47ce268e3835b12abccc9fb2e1dd8c6.tar.gz bugzilla-e9a32920f47ce268e3835b12abccc9fb2e1dd8c6.tar.xz |
Major spankage. Added a new state, UNCONFIRMED. Added new groups,
"editbugs" and "canconfirm". People without these states are now much
more limited in what they can do.
For backwards compatability, by default all users will have the
editbugs and canconfirm bits on them. Installing this changes as is
should only have one major visible effect -- an UNCONFIRMED state
will appear in the query page. But no bugs will become in that state,
until you tweak some of the new voting-related parameters you'll find
when editing products.
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-x | userprefs.cgi | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/userprefs.cgi b/userprefs.cgi index 0ee7d576f..88f032192 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -215,6 +215,42 @@ sub SaveFooter { +sub ShowPermissions { + print "You have the following permission bits set on your account:\n"; + print "<P><UL>\n"; + my $found = 0; + SendSQL("SELECT description FROM groups " . + "WHERE bit & $::usergroupset != 0 " . + "ORDER BY bit"); + while (MoreSQLData()) { + my ($description) = (FetchSQLData()); + print "<LI>$description\n"; + $found = 1; + } + if ($found == 0) { + print "<LI>(No extra permission bits have been set).\n"; + } + print "</UL>\n"; + SendSQL("SELECT blessgroupset FROM profiles WHERE userid = $userid"); + my $blessgroupset = FetchOneColumn(); + if ($blessgroupset) { + print "And you can turn on or off the following bits for\n"; + print qq{<A HREF="editusers.cgi">other users</A>:\n}; + print "<P><UL>\n"; + SendSQL("SELECT description FROM groups " . + "WHERE bit & $blessgroupset != 0 " . + "ORDER BY bit"); + while (MoreSQLData()) { + my ($description) = (FetchSQLData()); + print "<LI>$description\n"; + } + print "</UL>\n"; + } +} + + + + ###################################################################### ################# Live code (not sub defs) starts here ############### @@ -239,7 +275,9 @@ my @banklist = ( ["diffs", "Email settings", \&ShowDiffs, \&SaveDiffs], ["footer", "Page footer", - \&ShowFooter, \&SaveFooter] + \&ShowFooter, \&SaveFooter], + ["permissions", "Permissions", + \&ShowPermissions, undef] ); @@ -300,9 +338,11 @@ if (defined $bankdescription) { </TABLE> <INPUT TYPE="hidden" NAME="dosave" VALUE="1"> <INPUT TYPE="hidden" NAME="bank" VALUE="$bank"> -<INPUT TYPE="submit" VALUE="Submit"> -</FORM> }; + if ($savefunc) { + print qq{<INPUT TYPE="submit" VALUE="Submit">\n}; + } + print qq{</FORM>\n}; } else { print "<P>Please choose from the above links which settings you wish to change.</P>"; } |