diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/ResourceBase.php b/core/modules/rest/lib/Drupal/rest/Plugin/ResourceBase.php index b829c7c..689d286 100644 --- a/core/modules/rest/lib/Drupal/rest/Plugin/ResourceBase.php +++ b/core/modules/rest/lib/Drupal/rest/Plugin/ResourceBase.php @@ -92,6 +92,8 @@ public function routes() { // The HTTP method is a requirement for this route. '_method' => $method, '_permission' => "restful $lower_method $this->pluginId", + ), array( + '_access_mode' => 'ANY', )); switch ($method) { diff --git a/core/modules/system/tests/modules/router_test/router_test.routing.yml b/core/modules/system/tests/modules/router_test/router_test.routing.yml index 2eda2c8..7341c08 100644 --- a/core/modules/system/tests/modules/router_test/router_test.routing.yml +++ b/core/modules/system/tests/modules/router_test/router_test.routing.yml @@ -48,6 +48,8 @@ router_test_8: router_test_9: pattern: '/router_test/test9' + options: + _access_mode: 'ANY' defaults: _controller: '\Drupal\router_test\TestControllers::test8' requirements: