From 1d057f02b277d29ad4d232d598c49b0344798b40 Mon Sep 17 00:00:00 2001 From: "bbaetz%acm.org" <> Date: Tue, 3 Jun 2003 16:47:37 +0000 Subject: Bug 180635 - Enhance Bugzilla::User to store additional information r=myk,jake --- editusers.cgi | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'editusers.cgi') 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.
\n"; SendSQL("SELECT last_insert_id()"); my ($newuserid) = FetchSQLData(); - DeriveGroup($newuserid); + print "To change ${user}'s permissions, go back and edit this user"; print "

\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 "

\n"; print "\n"; @@ -844,7 +848,8 @@ if ($action eq 'update') { print "Updated user's name.
\n"; } - DeriveGroup($thisuserid); + my $changeduser = new Bugzilla::User($thisuserid); + $changeduser->derive_groups(); PutTrailer($localtrailer); exit; -- cgit v1.2.3-24-g4f1b