summaryrefslogtreecommitdiffstats
path: root/editusers.cgi
diff options
context:
space:
mode:
authorbbaetz%acm.org <>2003-06-03 18:47:37 +0200
committerbbaetz%acm.org <>2003-06-03 18:47:37 +0200
commit1d057f02b277d29ad4d232d598c49b0344798b40 (patch)
tree5dd73500b1cf10b51875179f7559c8ec97f0b5be /editusers.cgi
parent3a843833f4ab5d07f10e199daa7ec317e03b9959 (diff)
downloadbugzilla-1d057f02b277d29ad4d232d598c49b0344798b40.tar.gz
bugzilla-1d057f02b277d29ad4d232d598c49b0344798b40.tar.xz
Bug 180635 - Enhance Bugzilla::User to store additional information
r=myk,jake
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-xeditusers.cgi13
1 files changed, 9 insertions, 4 deletions
diff --git a/editusers.cgi b/editusers.cgi
index b0e6d621c..b4ed7c2d0 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -34,6 +34,8 @@ use lib ".";
require "CGI.pl";
require "globals.pl";
+use Bugzilla::User;
+
# Shut up misguided -w warnings about "used only once". "use vars" just
# doesn't work for me.
@@ -241,7 +243,7 @@ print Bugzilla->cgi->header();
$editall = UserInGroup("editusers");
if (!$editall) {
- if (!UserCanBlessAnything()) {
+ if (!Bugzilla->user->can_bless) {
PutHeader("Not allowed");
print "Sorry, you aren't a member of the 'editusers' group, and you\n";
print "don't have permissions to put people in or out of any group.\n";
@@ -483,7 +485,7 @@ if ($action eq 'new') {
print "OK, done.<br>\n";
SendSQL("SELECT last_insert_id()");
my ($newuserid) = FetchSQLData();
- DeriveGroup($newuserid);
+
print "To change ${user}'s permissions, go back and <a href=\"editusers.cgi?action=edit&user=" . url_quote($user)."\">edit this user</A>";
print "<p>\n";
PutTrailer($localtrailer,
@@ -682,7 +684,9 @@ if ($action eq 'edit') {
my ($thisuserid, $realname, $disabledtext) = FetchSQLData();
if ($thisuserid > 0) {
- DeriveGroup($thisuserid);
+ # Force groups to be up to date
+ my $changeduser = new Bugzilla::User($thisuserid);
+ $changeduser->derive_groups();
}
print "<FORM METHOD=POST ACTION=editusers.cgi>\n";
print "<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=0><TR>\n";
@@ -844,7 +848,8 @@ if ($action eq 'update') {
print "Updated user's name.<BR>\n";
}
- DeriveGroup($thisuserid);
+ my $changeduser = new Bugzilla::User($thisuserid);
+ $changeduser->derive_groups();
PutTrailer($localtrailer);
exit;