Missing requirement for node specific submission import route

Created on 12 June 2023, about 1 year ago
Updated 20 April 2024, 2 months ago

Problem/Motivation

Upload tab appears on node results page even if user doesn't have the "update any submission" permission.

Proposed resolution

Add the same requirement that we have on the non-node upload route:

_entity_access: 'webform.submission_update_any'

That should give something like:

entity.node.webform_submission_export_import.results_import:
  path: '/node/{node}/webform/results/upload'
  defaults:
    _form: '\Drupal\webform_submission_export_import\Form\WebformSubmissionExportImportUploadForm'
    _title_callback: '\Drupal\Core\Entity\Controller\EntityController::title'
    operation: webform_submission_view
    entity_access: 'webform.submission_view_any'
  options:
    parameters:
      node:
        type: 'entity:node'
  requirements:
    _entity_access: 'webform.submission_update_any'
    _custom_access: '\Drupal\webform_node\Access\WebformNodeAccess::checkWebformResultsAccess'
πŸ› Bug report
Status

Fixed

Version

6.2

Component

Code

Created by

πŸ‡«πŸ‡·France mably

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024