Commit 20de8d74 authored by Rodel Duterte's avatar Rodel Duterte
Browse files

Restrict autocomplete route access and re-enable entity access check

parent fd245488
Loading
Loading
Loading
Loading
+1 −1
Changes for dopup.routing.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ dopup.autocomplete_webform:
  defaults:
    _controller: '\Drupal\dopup\Controller\DopupAutoCompleteController::build'
  requirements:
    _permission: 'access content'
    _permission: 'administer webform'

dopup.settings_form:
  path: '/admin/config/system/dopup/{block}'
+1 −1
Changes for src/Controller/DopupAutoCompleteController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ class DopupAutoCompleteController extends ControllerBase {
    // @todo Filter by category as well.
    $webforms = $this->entityTypeManager->getStorage('webform')
      ->getQuery('OR')
      ->accessCheck(FALSE)
      ->accessCheck()
      ->condition('id', $keys, 'CONTAINS')
      ->condition('title', $keys, 'CONTAINS')
      ->condition('options', $keys, 'CONTAINS')