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

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

solideogloria created an issue. See original summary.

solideogloria’s picture

Status: Active » Needs review

See MR

solideogloria’s picture

Title: Permission typos in webform.theme.template.inc » Non-existent permissions in webform.theme.template.inc
jrockowitz’s picture

Version: 6.2.x-dev » 6.1.x-dev
Status: Needs review » Reviewed & tested by the community
jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for catching this mistake

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.