2

In my Drupal 7 site, I have a webform where anonymous users upload a file (typically, their CV). The webform is configured to save it in the private file system. How can I achieve that the uploaded files are accessible only to authenticated users who belong to a specific role ? (at this moment they are accessible only to the admin user)

thanks

1

By default, users with the 'access all webform results' permission can view all webform private files.

If, for some reason you need them to be able to access the files but not the webform results, you could implement hook_file_download() - you could base your implementation on webform_file_download() in webform.module

0

Think you need Private files download permission

  • Thx. I came across several modules, but not this one. I will check this. – sanette Dec 18 '14 at 17:20
  • This doesn't work. It might work for standard node attachments, but I think that the webform module has its own hooks for controlling access, and once access is denied the 'Private files download permission' module doesn't seem to be able to overrule. – sanette Dec 18 '14 at 18:48
  • 1
    I'm thinking of implementing my own hooks in my custom module... – sanette Dec 18 '14 at 18:49
0

Personally I would use Permissions per Webform and then limit accessing all results for that particular webform to the roles that you need.

The only issue at that point would be if you had multiple roes needing multiple levels of results access.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.