Skip to content
Snippets Groups Projects
Commit 6b134baf authored by Ryo Yamashita's avatar Ryo Yamashita Committed by Yas Naoi
Browse files

Issue #3360896 by Ryo Yamashita, yas, baldwinlouie: Fix Cloud Dashboard's permission

parent ea6cd53e
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,11 @@ cloud_dashboard.endpoint1: ...@@ -18,7 +18,11 @@ cloud_dashboard.endpoint1:
_title: Cloud Dashboard _title: Cloud Dashboard
_form: '\Drupal\cloud_dashboard\Form\React\CloudDashboardForm' _form: '\Drupal\cloud_dashboard\Form\React\CloudDashboardForm'
requirements: requirements:
_permission: 'administer' # Use custom access that will check for cloud_context and the desired permission.
# Desired permission is passed as an option in the "perm" variable
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::access'
options:
perm: 'access dashboard'
# Ex. # Ex.
# * /clouds/dashboard/aws_cloud/instance # * /clouds/dashboard/aws_cloud/instance
...@@ -30,7 +34,11 @@ cloud_dashboard.endpoint2: ...@@ -30,7 +34,11 @@ cloud_dashboard.endpoint2:
_title: Cloud Dashboard _title: Cloud Dashboard
_form: '\Drupal\cloud_dashboard\Form\React\CloudDashboardForm' _form: '\Drupal\cloud_dashboard\Form\React\CloudDashboardForm'
requirements: requirements:
_permission: 'administer' # Use custom access that will check for cloud_context and the desired permission.
# Desired permission is passed as an option in the "perm" variable
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::access'
options:
perm: 'access dashboard'
# Ex. # Ex.
# * /clouds/dashboard/aws_cloud/sample_client1/instance # * /clouds/dashboard/aws_cloud/sample_client1/instance
...@@ -41,7 +49,11 @@ cloud_dashboard.endpoint3: ...@@ -41,7 +49,11 @@ cloud_dashboard.endpoint3:
_title: Cloud Dashboard _title: Cloud Dashboard
_form: '\Drupal\cloud_dashboard\Form\React\CloudDashboardForm' _form: '\Drupal\cloud_dashboard\Form\React\CloudDashboardForm'
requirements: requirements:
_permission: 'administer' # Use custom access that will check for cloud_context and the desired permission.
# Desired permission is passed as an option in the "perm" variable
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::access'
options:
perm: 'access dashboard'
# Ex. # Ex.
# * /clouds/dashboard/aws_cloud/sample_client1/instance/1 # * /clouds/dashboard/aws_cloud/sample_client1/instance/1
...@@ -52,7 +64,11 @@ cloud_dashboard.endpoint4: ...@@ -52,7 +64,11 @@ cloud_dashboard.endpoint4:
_title: Cloud Dashboard _title: Cloud Dashboard
_form: '\Drupal\cloud_dashboard\Form\React\CloudDashboardForm' _form: '\Drupal\cloud_dashboard\Form\React\CloudDashboardForm'
requirements: requirements:
_permission: 'administer' # Use custom access that will check for cloud_context and the desired permission.
# Desired permission is passed as an option in the "perm" variable
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::access'
options:
perm: 'access dashboard'
# Ex. # Ex.
# * /clouds/dashboard/aws_cloud/sample_client1/instance/1/edit # * /clouds/dashboard/aws_cloud/sample_client1/instance/1/edit
...@@ -63,7 +79,11 @@ cloud_dashboard.endpoint5: ...@@ -63,7 +79,11 @@ cloud_dashboard.endpoint5:
_title: Cloud Dashboard _title: Cloud Dashboard
_form: '\Drupal\cloud_dashboard\Form\React\CloudDashboardForm' _form: '\Drupal\cloud_dashboard\Form\React\CloudDashboardForm'
requirements: requirements:
_permission: 'administer' # Use custom access that will check for cloud_context and the desired permission.
# Desired permission is passed as an option in the "perm" variable
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::access'
options:
perm: 'access dashboard'
# Ex. # Ex.
# * /clouds/dashboard/openstack/sample_client3/image/6/resource/1 # * /clouds/dashboard/openstack/sample_client3/image/6/resource/1
...@@ -73,7 +93,11 @@ cloud_dashboard.endpoint6: ...@@ -73,7 +93,11 @@ cloud_dashboard.endpoint6:
_title: Cloud Dashboard _title: Cloud Dashboard
_form: '\Drupal\cloud_dashboard\Form\React\CloudDashboardForm' _form: '\Drupal\cloud_dashboard\Form\React\CloudDashboardForm'
requirements: requirements:
_permission: 'administer' # Use custom access that will check for cloud_context and the desired permission.
# Desired permission is passed as an option in the "perm" variable
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::access'
options:
perm: 'access dashboard'
# Cloud Admin Settings. # Cloud Admin Settings.
cloud_dashboard.settings: cloud_dashboard.settings:
...@@ -82,7 +106,7 @@ cloud_dashboard.settings: ...@@ -82,7 +106,7 @@ cloud_dashboard.settings:
_title: 'Cloud Dashboard' _title: 'Cloud Dashboard'
_form: '\Drupal\cloud_dashboard\Form\Config\CloudDashboardAdminSettings' _form: '\Drupal\cloud_dashboard\Form\Config\CloudDashboardAdminSettings'
requirements: requirements:
_permission: 'administer' _permission: 'administer cloud'
# Callback URI for Cloud Admin Settings. # Callback URI for Cloud Admin Settings.
cloud_dashboard.callback_uri: cloud_dashboard.callback_uri:
...@@ -111,7 +135,11 @@ cloud_dashboard.jsonapi_server_uri: ...@@ -111,7 +135,11 @@ cloud_dashboard.jsonapi_server_uri:
_controller: '\Drupal\cloud_dashboard\Controller\CloudDashboardConfigController::getJsonApiServerUri' _controller: '\Drupal\cloud_dashboard\Controller\CloudDashboardConfigController::getJsonApiServerUri'
methods: [GET] methods: [GET]
requirements: requirements:
_permission: 'administer' # Use custom access that will check for cloud_context and the desired permission.
# Desired permission is passed as an option in the "perm" variable
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::access'
options:
perm: 'access dashboard'
# URL of the image to be displayed as the default marker icon in Leaflet.js. # URL of the image to be displayed as the default marker icon in Leaflet.js.
cloud_dashboard.marker_icon_uri: cloud_dashboard.marker_icon_uri:
...@@ -120,7 +148,11 @@ cloud_dashboard.marker_icon_uri: ...@@ -120,7 +148,11 @@ cloud_dashboard.marker_icon_uri:
_controller: '\Drupal\cloud_dashboard\Controller\CloudDashboardConfigController::getMakerIconUri' _controller: '\Drupal\cloud_dashboard\Controller\CloudDashboardConfigController::getMakerIconUri'
methods: [GET] methods: [GET]
requirements: requirements:
_permission: 'administer' # Use custom access that will check for cloud_context and the desired permission.
# Desired permission is passed as an option in the "perm" variable
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::access'
options:
perm: 'access dashboard'
# The URL of the coordinate data for drawing the world map, expressed in GeoJson format. # The URL of the coordinate data for drawing the world map, expressed in GeoJson format.
cloud_dashboard.map_geojson_uri: cloud_dashboard.map_geojson_uri:
...@@ -129,7 +161,11 @@ cloud_dashboard.map_geojson_uri: ...@@ -129,7 +161,11 @@ cloud_dashboard.map_geojson_uri:
_controller: '\Drupal\cloud_dashboard\Controller\CloudDashboardConfigController::getMapGeoJsonUri' _controller: '\Drupal\cloud_dashboard\Controller\CloudDashboardConfigController::getMapGeoJsonUri'
methods: [GET] methods: [GET]
requirements: requirements:
_permission: 'administer' # Use custom access that will check for cloud_context and the desired permission.
# Desired permission is passed as an option in the "perm" variable
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::access'
options:
perm: 'access dashboard'
# Configuration information about the location map. # Configuration information about the location map.
cloud_dashboard.location_map_config: cloud_dashboard.location_map_config:
...@@ -138,4 +174,8 @@ cloud_dashboard.location_map_config: ...@@ -138,4 +174,8 @@ cloud_dashboard.location_map_config:
_controller: '\Drupal\cloud_dashboard\Controller\CloudDashboardConfigController::getLocationMapConfig' _controller: '\Drupal\cloud_dashboard\Controller\CloudDashboardConfigController::getLocationMapConfig'
methods: [GET] methods: [GET]
requirements: requirements:
_permission: 'administer' # Use custom access that will check for cloud_context and the desired permission.
# Desired permission is passed as an option in the "perm" variable
_custom_access: '\Drupal\cloud\Controller\CloudConfigController::access'
options:
perm: 'access dashboard'
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