You are here

private function KernelEventListener::sendUserToAccessDeniedPage in Permissions by Term 8

1 call to KernelEventListener::sendUserToAccessDeniedPage()
KernelEventListener::onKernelRequest in src/Listener/KernelEventListener.php
Access restriction on kernel request.

File

src/Listener/KernelEventListener.php, line 151

Class

KernelEventListener
Class KernelEventListener.

Namespace

Drupal\permissions_by_term\Listener

Code

private function sendUserToAccessDeniedPage() {
  $redirect_url = new \Drupal\Core\Url('system.403');
  $response = new RedirectResponse($redirect_url
    ->toString());
  $response
    ->send();
  return $response;
}