function _handle_access_auth_check() { $auth_username = reason_check_authentication(); $rpa = new reasonPageAccess(); $rpa->set_page_tree($this->pages); $has_access = $rpa->has_access($auth_username, $this->page_id); if(!$has_access) { if(!empty($auth_username)) { $this->_display_403_page(); die(); } else { header('Location: '.REASON_LOGIN_URL.'?dest_page='.urlencode(get_current_url())); die(); } } else { $this->page_is_public = (empty($auth_username)) ? true : $rpa->has_access(false, $this->page_id); } }
function get_page_restriction_groups($page, $site) { $rpa = new reasonPageAccess(); $page_tree = $this->get_page_tree($site); $rpa->set_page_tree($page_tree); return $rpa->get_groups($page->id()); }