public function _eventHandlerBeforeExecuteRoute()
{
$ignoreMethods = ['GET', 'HEAD', 'OPTIONS'];
if (isset($this->csrfToken) && !in_array($this->request->getMethod(), $ignoreMethods, true)) {
$this->csrfToken->verify();
}
$r = $this->_moduleObject->authorize($this->dispatcher->getControllerName(), $this->dispatcher->getActionName());
if ($r === false || is_object($r)) {
return false;
} else {
return true;
}
}