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 commentedSee MR
Comment #4
solideogloria commentedComment #5
jrockowitz commentedComment #6
jrockowitz commentedThank you for catching this mistake