From 78346fcc62a968360aba22ffcf317009abf7e6f2 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 25 Nov 2024 22:24:18 +0000 Subject: [PATCH] Bug 1931772 - Can't call method "in_group" on an undefined value at Bugzilla/App/Controller/BouncedEmails.pm line 27 --- Bugzilla/App/Controller/BouncedEmails.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Bugzilla/App/Controller/BouncedEmails.pm b/Bugzilla/App/Controller/BouncedEmails.pm index ddf267f4db..722e2f0796 100644 --- a/Bugzilla/App/Controller/BouncedEmails.pm +++ b/Bugzilla/App/Controller/BouncedEmails.pm @@ -21,7 +21,10 @@ sub setup_routes { sub view { my ($self) = @_; - my $user = $self->bugzilla->login(LOGIN_REQUIRED); + + Bugzilla->usage_mode(USAGE_MODE_MOJO); + + my $user = $self->bugzilla->login(LOGIN_REQUIRED) || return undef; my $other_user = Bugzilla::User->check({id => $self->param('userid')}); unless ($user->in_group('editusers') @@ -29,7 +32,7 @@ sub view { || $user->id == $other_user->id) { ThrowUserError('auth_failure', - {reason => "not_visible", action => "modify", object => "user"}); + {reason => 'not_visible', action => 'modify', object => 'user'}); } if ( $self->param('enable_email')