diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-10-14 20:21:41 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-10-14 20:22:53 +0200 |
commit | d1d366d4517d67e46ad930336a468ef56bdea2db (patch) | |
tree | fe3f4d97516f7eab59fe9199879acea3c227e8c1 /Bugzilla.pm | |
parent | 480e3572661cc856591e0aa11b5eb023338558ed (diff) | |
download | bugzilla-d1d366d4517d67e46ad930336a468ef56bdea2db.tar.gz bugzilla-d1d366d4517d67e46ad930336a468ef56bdea2db.tar.xz |
throw login_required if not already the case
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r-- | Bugzilla.pm | 5 |
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; } |