From a23da324a647296a31436631b958bc3443ceaaf2 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Fri, 14 Oct 2005 06:58:24 +0000 Subject: Bug 204498 Add su (setuser) function Patch by A. Karl Kornel r=joel, a=justdave --- Bugzilla/Template.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla/Template.pm') diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index a4b8084d0..b1646dbf0 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -497,8 +497,13 @@ sub create { 'lsearch' => \&Bugzilla::Util::lsearch, # Currently logged in user, if any + # If an sudo session is in progress, this is the user we're faking 'user' => sub { return Bugzilla->user; }, + # If an sudo session is in progress, this is the user who + # started the session. + 'sudoer' => sub { return Bugzilla->sudoer; }, + # UserInGroup. Deprecated - use the user.* functions instead 'UserInGroup' => \&Bugzilla::User::UserInGroup, -- cgit v1.2.3-24-g4f1b