When configuring a component with the "Private" option, it's always disabled if you don't have "access all webform results" permission. This is because the private checkbox uses webform_results_access($node), but we're passing in pseudo-node that doesn't have the required properties to do the access check.

Considering the Webform node is already going to be loaded when editing it, and we already have access to the NID through $component['nid'], we should fully load the node when possible.

Comments

quicksketch’s picture

StatusFileSize
new2.29 KB

After looking at #1405108: Add support for Webform's "unique" validation, which faces a similar problem, I realized that it would be a good idea to prefix these pseudo properties with "webform_" so that we don't conflict with real FAPI properties in the future. This patch makes #private into #webform_private to avoid this conflict. It will be dependent upon the matching Webform patch in #1730714: Allow "private" option to be editable in Form Builder.

fenstrat’s picture

Status: Needs review » Fixed

Looks like this was committed to 6.x-1.x and 7.x-1.x.

Tested, and along with #1730714: Allow "private" option to be editable in Form Builder works well to enable the "private" option in form builder (as in it actually saves now).

Status: Fixed » Closed (fixed)

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