1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 15:57:01 +02:00

Update to the viewable permission check in ProcessPageEditLink module

This commit is contained in:
Ryan Cramer
2024-11-15 14:33:24 -05:00
parent 53b7aa39eb
commit 8a1ba87298

View File

@@ -124,8 +124,9 @@ class ProcessPageEditLink extends Process implements ConfigurableModule {
$id = (int) $input->get('id');
$this->langID = (int) $input->get('lang');
if($id) $this->page = $pages->get($id);
if($this->page && $this->page->id && !$this->wire()->user->hasPermission("page-view", $this->page)) {
throw new WireException("You don't have access to this page");
// if($this->page && $this->page->id && !$this->wire()->user->hasPermission("page-view", $this->page)) {
if($this->page && $this->page->id && !$this->page->viewable()) {
throw new WireException($this->_('Page is not viewable'));
}
if(!$this->page) $this->page = $pages->newNullPage();