From d1d366d4517d67e46ad930336a468ef56bdea2db Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Sun, 14 Oct 2018 14:21:41 -0400 Subject: throw login_required if not already the case --- Bugzilla.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Bugzilla.pm b/Bugzilla.pm index 1ea1e59a3..27ed0876c 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -406,6 +406,11 @@ sub login { $class->user->update_last_seen_date(); } + if ($type == LOGIN_REQUIRED && ! $class->user->id) { + FATAL("Detected failure to throw login_required when login was required and user is not logged in."); + ThrowUserError('login_required'); + } + return $class->user; } -- cgit v1.2.3-24-g4f1b