Closed (fixed)
Project:
Webform
Version:
7.x-4.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Feb 2013 at 14:03 UTC
Updated:
8 Apr 2013 at 11:41 UTC
When a form is set up so only custom role(s) can use it, anonymous users see "You do not have permission to view this form".
I think we should account for custom roles.
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| webform_permission_message_custom_roles.patch | 779 bytes | pjcdawkins |
Comments
Comment #1
pjcdawkins commentedComment #2
froboyI ran into the same problem. Tested this and it works perfectly.
Comment #3
carwin commentedI'm sorry guys, I don't quite understand issue description. @pjcdawkins / @froboy, can one of you help me out here?
Comment #4
pjcdawkins commentedWhen anonymous users do not have access to something, they should be prompted to log in.
At the moment Webform only gives that prompt if the 'authenticated user' role has access. For Webforms restricted to custom roles, Webform shows this message to anonymous users: "You do not have permission to view this form". That's rather uninviting.
The patch in the OP gives the login prompt to anonymous users regardless of whether 'authenticated user' has access.
Comment #5
froboyYup. As an example, we have a form that we restrict to a custom role called "Student" but don't allow the generic "Authenticated User" to fill out.
Comment #6
carwin commentedLooks great to me. Thanks for the patch.
Comment #8
barrapontoI didn't expect Webform to do this on its own, that's what modules such as Redirect 403 to Login exist for.
Comment #9
pjcdawkins commented@barraponto but Webform doesn't issue a 403 - this is in cases where node access is granted but the webform is only available to authenticated users. Very useful for many cases, such as where you want to describe the form in the node body so that people might know that they want to use the form, or when you want a public View listing forms.
[edit: this isn't a redirect, simply a message with a link]