Many websites display the total submission count of webforms to anonymous users to show the level of support for their campaigns (change.org, kickstarter, etc). Webform is well suited for these kinds of forms except that the submission_count field that is available within views is tied to the same permission that accesses individual submission items.
I propose adding a new role-based permission to "Access webform submissions count" so that site builders can display this data to anonymous users without resorting to hacks, of which there are several in the past looking for similar functionality from webform.
Committed to 7.x-4.x and 8.x
Comments
Comment #2
danchadwick commentedWhat are the "hacks" to which you refer?
I just looked at the views submission count handler (webform_handler_field_submission_count), and when used for a webform node, it returns a count which is a link:
I don't think for anonymous users you want either of these.
Instead, if the user has neither access to all the result nor access to the list of their own submissions, the a count of all the results (with no links) should be returned. Note that this is a VERY SLIGHT difference in security. The total number of submissions would be exposed now in a situation where it previously a non-functional link with a count of the anonymous submissions would have been given.
Comment #3
mducharme commentedHere are two examples:
http://drupal.stackexchange.com/questions/57105/webform-submission-count...
https://www.drupal.org/node/1905924
Thanks for the quick patch. I'll test this out later today.
Comment #4
danchadwick commentedThanks. I posted to those two places. Remember to make sure that the dev build has the patch. It can take a few hours.