Skip to content
Snippets Groups Projects
Commit f390e48a authored by Yas Naoi's avatar Yas Naoi
Browse files

Issue #3294631 by yas, baldwinlouie: Add a comment for bypass_any_own_check:...

Issue #3294631 by yas, baldwinlouie: Add a comment for bypass_any_own_check: true of entity.*.list_update.all in *.routing.yml
parent 59580d75
No related branches found
No related tags found
3 merge requests!1316Issue #3310263: Release 4.5.0,!1260Issue #3307397: Release 4.4.0,!1164Issue #3294631: Add a comment for bypass_any_own_check: true of entity.*.list_update.all in *.routing.yml
......@@ -54,6 +54,7 @@ entity.k8s_node.list_update.all:
requirements:
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::checkAccessForUpdateAll'
options:
# Pass the bypass_own_any_check=true parameter to skip any/own access check.
bypass_any_own_check: true
entity_type: 'k8s_node'
perm: 'view k8s node'
......@@ -564,6 +565,7 @@ entity.k8s_event.list_update.all:
requirements:
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::checkAccessForUpdateAll'
options:
# Pass the bypass_own_any_check=true parameter to skip any/own access check.
bypass_any_own_check: true
entity_type: 'k8s_event'
perm: 'view k8s event'
......
......@@ -36,6 +36,7 @@ entity.terraform_workspace.list_update.all:
requirements:
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::checkAccessForUpdateAll'
options:
# Pass the bypass_own_any_check=true parameter to skip any/own access check.
bypass_any_own_check: true
entity_type: 'terraform_workspace'
perm: 'view terraform workspace'
......
......@@ -126,6 +126,7 @@ entity.vmware_host.list_update.all:
requirements:
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::checkAccessForUpdateAll'
options:
# Pass the bypass_own_any_check=true parameter to skip any/own access check.
bypass_any_own_check: true
entity_type: 'vmware_host'
perm: 'view any vmware host'
......
......@@ -329,7 +329,7 @@ class CloudConfigController extends ControllerBase implements ContainerInjection
* the entity definition. This is helpful if a module provides more than
* one cloud_config_bundle
*
* Optionally, pass the `bypass_own_any_check=true` parameter to skip own/any
* Optionally, pass the `bypass_own_any_check=true` parameter to skip any/own
* access check.
*
* Example route declaration:
......@@ -385,8 +385,8 @@ class CloudConfigController extends ControllerBase implements ContainerInjection
}
foreach ($cloud_configs ?: [] as $cloud_config) {
// If bypass_any_own_check option is passed and TRUE, skip the
// any/own checking.
// If bypass_any_own_check option is passed and TRUE, skip any/own access
// check.
if (!empty($route->getOption('bypass_any_own_check'))
&& $route->getOption('bypass_any_own_check') === TRUE) {
$access_result = AccessResult::allowed();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment