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:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user