summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-10-14 20:21:41 +0200
committerDylan William Hardison <dylan@hardison.net>2018-10-14 20:22:53 +0200
commitd1d366d4517d67e46ad930336a468ef56bdea2db (patch)
treefe3f4d97516f7eab59fe9199879acea3c227e8c1 /Bugzilla.pm
parent480e3572661cc856591e0aa11b5eb023338558ed (diff)
downloadbugzilla-d1d366d4517d67e46ad930336a468ef56bdea2db.tar.gz
bugzilla-d1d366d4517d67e46ad930336a468ef56bdea2db.tar.xz
throw login_required if not already the case
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm5
1 files changed, 5 insertions, 0 deletions
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;
}