HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search
-
Re: Custom permissions and custom errors
public function CustomPermission($Permission) { if(Gdn::Session()->CheckPermission($Permission)){ return TRUE; }else{ header("HTTP/1.0 401", TRUE, 401); if ($this->DeliveryMethod() != DELIVERY_METHOD_XHTML) { $this->Render(); } else { $this->MasterView = 'empty'; $this->View='yourview'; $this->Render(); } exit; } } -
Re: Custom permissions and custom errors
Here what I've done: added this function to my application bootstrap.php function PermissionCheck($Controller, $Permission, $ErrorView, $ErrorMasterView) { if( CheckPermission($Permission) ){ return TRUE; }else{ header("HTTP/1.0 401", TRUE, 401); if($ErrorMasterView){ $Controller->MasterView = $ErrorMasterView; }…
2 results