Skip to content

Commit

Permalink
Fix issue with requestFile not viewable when page didn't have templat…
Browse files Browse the repository at this point in the history
…e file.
  • Loading branch information
ryancramerdesign committed Nov 30, 2012
1 parent f7c3085 commit e000252
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions wire/modules/Process/ProcessPageView.module
Expand Up @@ -254,6 +254,13 @@ class ProcessPageView extends Process {
protected function checkAccess($page) {

if($page->viewable()) return $page;

if($this->requestFile) {
// if a file was requested, we still allow view even if page doesn't have template file
// this is something that viewable() does not echeck
if($page->editable()) return $page;
if($page->status < Page::statusUnpublished && wire('user')->hasPermission('page-view', $page)) return $page;
}

$redirectLogin = $page->getAccessTemplate()->redirectLogin;

Expand Down

0 comments on commit e000252

Please sign in to comment.