1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-24 07:13:08 +02:00
This commit is contained in:
Ryan Cramer
2022-03-04 09:10:19 -05:00
parent 439703abdf
commit b7806022af
2 changed files with 20 additions and 7 deletions

View File

@@ -149,10 +149,11 @@ class ProcessPageView extends Process {
$code = $request->getResponseCode();
if($code == 401 || $code == 403) {
$this->userNotAllowed($user, $page, $request);
$this->userNotAllowed($user, $originalPage, $request);
}
if(!$page || !$page->id || $originalPage->id == $config->http404PageID) {
$this->checkForRedirect($request);
$s = 'access not allowed';
$e = new Wire404Exception($s, Wire404Exception::codePermission);
return $this->pageNotFound($originalPage, $request->getRequestPath(), true, $s, $e);