aboutsummaryrefslogtreecommitdiffstats
path: root/editwhines.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-09-16 05:01:56 +0000
committerlpsolit%gmail.com <>2005-09-16 05:01:56 +0000
commit0e9fdfdcb1b423f9d26747d779bf3d368b92ced1 (patch)
tree4efe75517a68809a853913add2d16b4be08ce931 /editwhines.cgi
parentb0fbfe878dd8194fbfb7c783e3e5498c50a2f8d9 (diff)
downloadbugs-0e9fdfdcb1b423f9d26747d779bf3d368b92ced1.tar
bugs-0e9fdfdcb1b423f9d26747d779bf3d368b92ced1.tar.gz
bugs-0e9fdfdcb1b423f9d26747d779bf3d368b92ced1.tar.bz2
bugs-0e9fdfdcb1b423f9d26747d779bf3d368b92ced1.tar.xz
bugs-0e9fdfdcb1b423f9d26747d779bf3d368b92ced1.zip
Bug 304696: Replace UserInGroup() by $user->in_group() when checking user privs in edit*.cgi files - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave
Diffstat (limited to 'editwhines.cgi')
-rwxr-xr-xeditwhines.cgi5
1 files changed, 2 insertions, 3 deletions
diff --git a/editwhines.cgi b/editwhines.cgi
index db9d08292..2b70acc13 100755
--- a/editwhines.cgi
+++ b/editwhines.cgi
@@ -36,7 +36,7 @@ use Bugzilla::Constants;
use Bugzilla::User;
use Bugzilla::Group;
# require the user to have logged in
-Bugzilla->login(LOGIN_REQUIRED);
+my $user = Bugzilla->login(LOGIN_REQUIRED);
###############################################################################
# Main Body Execution
@@ -46,7 +46,6 @@ my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
my $dbh = Bugzilla->dbh;
-my $user = Bugzilla->user;
my $userid = $user->id;
my $sth; # database statement handle
@@ -73,7 +72,7 @@ my $sth; # database statement handle
my $events = get_events($userid);
# First see if this user may use whines
-UserInGroup("bz_canusewhines")
+$user->in_group('bz_canusewhines')
|| ThrowUserError("auth_failure", {group => "bz_canusewhines",
action => "schedule",
object => "reports"});