Skip to content

Commit

Permalink
Bug 1931772 - Can't call method "in_group" on an undefined value at B…
Browse files Browse the repository at this point in the history
…ugzilla/App/Controller/BouncedEmails.pm line 27
  • Loading branch information
dklawren authored Nov 25, 2024
1 parent 48f38d8 commit 78346fc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Bugzilla/App/Controller/BouncedEmails.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ 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')
|| $user->in_group('disableusers')
|| $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')
Expand Down

0 comments on commit 78346fc

Please sign in to comment.