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
- Create a webform
- Allow anonymous users to create submissions from the access tab in webform settings
- Add a domain in "Domain access" field from webform configuration
- Go to the webform page url from the selected domain in anonymous context
- The webform page trigger an access denied exception
Proposed resolution
Update the hook_webform_access from the module to manage anonymous user use case
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | domain_access_webform--anonymous-user.diff | 840 bytes | ayalon |
Issue fork domain_access_webform-3500570
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 #2
ayalon commentedI 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.