Problem/Motivation

Currently, the module is getting all the pages for a webform which includes pages the user does not have access to. We should only validate the pages the user has access to.

Steps to reproduce

  • Create a webform
  • Grant access to only certain pages
  • try and submit

Proposed resolution

Use the 'edit', 'add', etc parameters in the getPages() function calls

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:

Comments

rymcveigh created an issue. See original summary.

rymcveigh’s picture

Status: Active » Needs review
lkacenja’s picture

Status: Needs review » Reviewed & tested by the community

I tested this out on my local environment and it seems to work well. We are reducing the pages a user can see by overriding the WebformSubmissionConditionsValidator service. With the code from this branch, form validation related to navigation is only executed on pages a user has visited. For other cases where the pages are not reduced there should be no impact. We also ran this branch through our testing suite that uses behat to assess a number of complicated webforms and found no issues.

  • rymcveigh committed 0b22a38 on 8.x-1.x
    Issue #3210778 by rymcveigh, lkacenja: Only use pages the user has...
rymcveigh’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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