/**
* Determine if a user has access to see the results of a webform.
*
* Note in addition to the view access to the results granted here, the $account
* must also have view access to the Webform node in order to see results.
* Access via this hook is in addition (adds permission) to the standard
* webform access.
*
* @param $node
* The Webform node to check access on.
* @param $account
* The user account to check access on.
*
* @return bool
* TRUE or FALSE if the user can access the webform results.
*
* @see webform_results_access()
*/
function hook_webform_results_access($node, $account) {
// Let editors view results of unpublished webforms.
if ($node->status == 0 && in_array('editor', $account->roles)) {
return TRUE;
}
else {
return FALSE;
}
}
Up to you how you want to limit it: perhaps a list of node IDs or using some field or property of the node or user account.
As this adds permission, you'll want to deny access to the webform results in permission, and then use this to selectively grant.
This is a security precaution. It's not recommended and it's not documented in the settings.php file, but you can set allow_insecure_uploads to be TRUE if you wish to allow uploading files like...
You can create a small custom module using this hook:
https://github.com/backdrop-contrib/webform/blob/136c20cb1c51cea203f3f0bc5355237c1d4dbf84/webform.api.php#L652-L678
/**
* Determine...
Posted13 hours 3 min ago by Martin Price (yorkshirepudding) on:
try sample.js.gz or sample.framework.js.gz or sample.js or anything smiliar and .js even if its not the file extension or it is, it will be renamed to _js. This is hardcoded security thing and i...
You can upload them through Content > Manage files > Add files (URL: /file/add) and they will be marked as permanent. Note that you should be able to multiselect or drag multiple images...
Comments
You can create a small custom module using this hook:
https://github.com/backdrop-contrib/webform/blob/136c20cb1c51cea203f3f0bc5355237c1d4dbf84/webform.api.php#L652-L678
Up to you how you want to limit it: perhaps a list of node IDs or using some field or property of the node or user account.
As this adds permission, you'll want to deny access to the webform results in permission, and then use this to selectively grant.