Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The checks for access to see submission information checks against non-existent permissions due to a typo.
if (\Drupal::currentUser()->hasPermission("view webform node submissions any $entity_type")) {
$variables['submissions_view'] = TRUE;
}
elseif (\Drupal::currentUser()->hasPermission("view webform node submissions own $entity_type")
&& method_exists($source_entity, 'getOwnerId')
&& (int) $source_entity->getOwnerId() === (int) \Drupal::currentUser()->id()
) {
$variables['submissions_view'] = TRUE;
}
But the permissions are:
'view webform submissions any node':
title: 'View webform submissions for any node'
'view webform submissions own node':
title: 'View webform submissions for own node'
Steps to reproduce
View a webform submission while having one of these permissions.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork webform-3331160
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
solideogloria CreditAttribution: solideogloria commentedSee MR
Comment #4
solideogloria CreditAttribution: solideogloria commentedComment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #6
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThank you for catching this mistake