1

In the Group module people can upload files if they're group manager. But the thing is, these files should be restricted to the group and everyone who isn't a member may not see this files.

The problem is they can see the files with the direct url: http://www.site.com/sites/default/.. I've tried the private folder and tweak some permissions with file_entity but without any result.

Does anyone know how to make files restricted to the group, even if someone access them with the direct url?

4
  • 1
    You will need to make the files private. That is the only way to restrict access to files. Unfortunately, the intricacies of that are more than can be explained in a comment.
    – Jaypan
    Feb 23, 2021 at 0:30
  • Thanks @Jaypan, but making the files private doesn't protect the files for direct access by outsiders of a group. Feb 23, 2021 at 8:16
  • Probably not by default, no. You may need to find a module or write some custom code to set the permission by group. You could maybe ask in the Group module queue. Nevertheless, private file permissions are the only way to apply Drupal permissions to file access.
    – Jaypan
    Feb 23, 2021 at 8:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.