An anonymous user can not access to a webform submission page

Created on 17 January 2025, 3 months ago

Problem/Motivation

When an anonymous user try to access to a webform :

  • allowed to the current domain
  • and with submissions allowed to anonymous users

the hook_webform_access return an access result forbidden and the page trigger an access denied exception.

Steps to reproduce

  1. Create a webform
  2. Allow anonymous users to create submissions from the access tab in webform settings
  3. Add a domain in "Domain access" field from webform configuration
  4. Go to the webform page url from the selected domain in anonymous context
  5. The webform page trigger an access denied exception

Proposed resolution

Update the hook_webform_access from the module to manage anonymous user use case

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @guenole
  • 🇨🇭Switzerland ayalon

    I can confirm the issue. An anonymous user does not have a domain assigned, and therefore the access is denied.

    Every anonymous user should at least be granted the current domain. Else there is no way to ever access a webform.

Production build 0.71.5 2024