From fe43c2dcdfc844fce2c699887cf1ddae53c24b4b Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 9 Sep 2005 06:40:08 +0000 Subject: Bug 256135: Parameter 'movers' is handled differently in Bug.pm and buglist.cgi - Patch by Frédéric Buclin r/a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/User.pm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'Bugzilla/User.pm') diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 024645eaf..8d31414ba 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -1102,7 +1102,18 @@ sub wants_mail { return defined($wants_mail) ? 1 : 0; } - + +sub is_mover { + my $self = shift; + + if (!defined $self->{'is_mover'}) { + my @movers = map { trim($_) } split(',', Param('movers')); + $self->{'is_mover'} = ($self->id + && lsearch(\@movers, $self->login) != -1); + } + return $self->{'is_mover'}; +} + sub get_userlist { my $self = shift; @@ -1565,6 +1576,12 @@ Returns true if the user wants mail for a given set of events. This method is more general than C, allowing you to check e.g. permissions for flag mail. +=item C + +Returns true if the user is in the list of users allowed to move bugs +to another database. Note that this method doesn't check whether bug +moving is enabled. + =back =head1 CLASS FUNCTIONS -- cgit v1.2.3-24-g4f1b