Skip to content

Commit

Permalink
Remove broken check to see if switched user can view page.
Browse files Browse the repository at this point in the history
Don't think there is really a way to do this well and honestly probably better seeing the error if the switched user can't view the initial page anyway.
  • Loading branch information
adrianbj committed Jul 4, 2024
1 parent 4b35ecd commit 3637c31
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions TracyDebugger.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function getModuleInfo() {
'summary' => __('Tracy debugger from Nette with many PW specific custom tools.', __FILE__),
'author' => 'Adrian Jones',
'href' => 'https://processwire.com/talk/forum/58-tracy-debugger/',
'version' => '4.26.27',
'version' => '4.26.28',
'autoload' => 100000, // in PW 3.0.114+ higher numbers are loaded first - we want Tracy first
'singular' => true,
'requires' => 'ProcessWire>=2.7.2, PHP>=5.4.4',
Expand Down Expand Up @@ -1839,12 +1839,7 @@ public function ready() {
$user = $this->wire('session')->forceLogin($this->wire('input')->post->userSwitcher);
$this->wire('session')->tracyUserSwitcherId = $tracyUserSwitcherId;
}
if($this->wire('pages')->get(self::inputUrl())->viewable) {
$this->wire('session')->redirect($this->httpReferer);
}
else {
$this->wire('session')->redirect(static::$inAdmin ? $this->wire('config')->urls->admin : $this->wire('config')->urls->root);
}
$this->wire('session')->redirect($this->httpReferer);
}
}

Expand Down

0 comments on commit 3637c31

Please sign in to comment.